Double IF Function Help Needed

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
975
I need a formula for one cell that will perform the following two steps:

1. IF H22=Y then display 1
OR
2. IF H22=N then display -1

Right now I have used IF((H22="Y")1,-1) but that displays -1 anytime Y is not displayed. As a default the cell value starts with "Select a value" displayed, and since "Select a value" is NOT "Y" as indicated in formula, it shows -1. I ONLY want -1 to show up if "N" is selected...

????
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I need a formula for one cell that will perform the following two steps:

1. IF H22=Y then display 1
OR
2. IF H22=N then display -1

Right now I have used IF((H22="Y")1,-1) but that displays -1 anytime Y is not displayed. As a default the cell value starts with "Select a value" displayed, and since "Select a value" is NOT "Y" as indicated in formula, it shows -1. I ONLY want -1 to show up if "N" is selected...

????
Try it like this...

=IF(H22="Y",1,IF(H22="N",-1,""))
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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