Nesting a CHOOSE Statment with an IF Statement

Zero85

New Member
Joined
Nov 28, 2011
Messages
18
Hello, I'm having trouble correctly combining two Excel functions into one string.

My Choose Function is operating correctly. I would like my formula to read: Choose(2010,2011,2012),IF(1=S, make it S, if not make it 0).

Any help is greatly appreciated.

CHOOSE Function:
[TABLE="width: 179"]
<colgroup><col width="137" style="width: 103pt; mso-width-source: userset; mso-width-alt: 3896;"> <col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 2872;"> <tbody>[TR]
[TD="class: xl76, width: 137, bgcolor: transparent"]2010[/TD]
[TD="class: xl77, width: 101, bgcolor: white"]1.1111%[/TD]
[/TR]
[TR]
[TD="class: xl76, bgcolor: transparent"]2011[/TD]
[TD="class: xl77, bgcolor: white"]2.2222%[/TD]
[/TR]
[TR]
[TD="class: xl76, bgcolor: transparent"]2012[/TD]
[TD="class: xl77, bgcolor: white"]3.3333%[/TD]
[/TR]
</tbody>[/TABLE]

IF Statement:
[TABLE="width: 179"]
<colgroup><col width="137" style="width: 103pt; mso-width-source: userset; mso-width-alt: 3896;"> <col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 2872;"> <tbody>[TR]
[TD="class: xl76, width: 137, bgcolor: transparent"]1[/TD]
[TD="class: xl77, width: 101, bgcolor: white"]S[/TD]
[/TR]
[TR]
[TD="class: xl76, bgcolor: transparent"]2[/TD]
[TD="class: xl77, bgcolor: white"]N[/TD]
[/TR]
[TR]
[TD="class: xl76, bgcolor: transparent"]3[/TD]
[TD="class: xl77, bgcolor: white"]Q[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Can you post your actual CHOOSE function please, and comment on how you want to change it ?

I haven't used CHOOSE very often, and looking at Excel help, it looks like it can't literally be =CHOOSE(2010,2011,2012...)
 
Upvote 0
Sure, my Choose function is following an numbered input switch. When I select 1(Cell B23), it reflects the value 1.111%(Cell E25), when on 2, it reflects 2.222%(Cell E26). My exact formula is: =Choose(B23,E25,E26)


I want to include an IF Statement within my CHOOSE string, which would read, IF Cell G=1, make it N. IF Cell G=2, make it 0. IF Cell G=3, do nothing.
 
Upvote 0
But you are asking to return 2 separate values. Which one do you want or how do you want the output combined?
 
Upvote 0
Zero85,

that would be a separate formula and not nested.
Code:
=CHOOSE(G10;"N";0;"")
 
Upvote 0
But you are asking to return 2 separate values. Which one do you want or how do you want the output combined?

Yes, I'll have to switch. One to activate the Choose function, and another to activate the IF Statement function. So I want the Choose function to be the master determinant, but if the IF Statement switch is activate, it takes over the control over Choose returns. So if the IF Statement says to make the value 0, the answer would reflect that. If the IF statement says do nothing, then the CHOOSE function is in control.
 
Upvote 0
So this is the formula I currently have.
=CHOOSE($B$23,$F$36,$F$37),IF($C$6=2,0%,"")

The Choose function is working well, but my IF statement is wrong. Its showing #Value as the answer when I include an IF Statement to that strong.


Basically I wrote the IF statement to say IF cell 6 equals 2, make it 0%, if it doesn't, do nothing. (I want the choose statement to be the determinant in this case).
 
Upvote 0
Zero85,

that would be:
Code:
[COLOR=#333333]=[/COLOR][COLOR=#333333]IF($C$6=2,0%,[/COLOR][COLOR=#333333]CHOOSE($B$23,$F$36,$F$37))[/COLOR]
 
Upvote 0
So this is the formula I currently have.
=CHOOSE($B$23,$F$36,$F$37),IF($C$6=2,0%,"")

The Choose function is working well, but my IF statement is wrong. Its showing #Value as the answer when I include an IF Statement to that strong.


Basically I wrote the IF statement to say IF cell 6 equals 2, make it 0%, if it doesn't, do nothing. (I want the choose statement to be the determinant in this case).

Sounds to my like you need to put the CHOOSE inside the IF, maybe as the last argument?
So if the IF Statement says to make the value 0, the answer would reflect that. If the IF statement says do nothing, then the CHOOSE function is in control.
That tyhen would be something like...
=if(G1=1,"N",1,if(G1=0,choose(...),""))

Code:
IF Cell G=1, make it N. IF Cell G=2, make it 0. IF Cell G=3, do nothing.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top