I could use some Excel Help

Aluvial

Explorer
I am trying to implement some Option Buttons for a sheet I'm desiging.

I'm using three options.

The linked cell gives the output of 1, 2, or 3

So far so good.

How do I make an individual cell respond to three different formulas?

Basically:

IF 1 then Do A
IF 2 Do B
IF 3 Do C

I can manage two of the options, but can't figure the IF function if there are three choices.

Thanks for the help.

aluvial@carolina.rr.com

Aluvial
 

log in or register to remove this ad

Assuming you're working in VBA ...

either

Code:
If 1 Then 
    X
Else If 2 Then
    Y
Else If 3 Then
    Z
End If


or

Code:
Dim x As Integer
x = [Cell value goes here; I don't remember scritping excel well enough]

Select Case x
    Case 1
        X
    Case 2
        Y
    Case 3
         Z
End Select
 
Last edited:

Is this anywhere close?

By the way, it isn't taking this exactly...

=IF(I7=1,8,"ROUNDUPB2/C7*8")ELSEIF(I7=2,10,"ROUNDUPB2/C7*10")ELSEIF(I7=3,12,"ROUNDUPB2/C7*12")
 

Aluvial said:
Is this anywhere close?

By the way, it isn't taking this exactly...

=IF(I7=1,8,"ROUNDUPB2/C7*8")ELSEIF(I7=2,10,"ROUNDUPB2/C7*10")ELSEIF(I7=3,12,"ROUNDUPB2/C7*12")

I was thinking in terms of a VBA macro, not a formula; sorry.
 

Remove ads

Top