Nested IF formula

datadummy

Active Member
Joined
Mar 16, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
I am attempting to write a nested if formula that currently looks like this =IF(I15:L15="NA","NA",IF(I15:L15="No","N",IF(I15:L15="Y","Y",""))) and am not getting the expected results. Currently cells I-L all equal NA. I'm sure I did something wrong and am looking for guidance to fix this or even use a better more simplistic approach.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
That is not a valid function.
You cannot check to see if a whole range of cells equals a single value like that.

Are you trying to check if ALL cells in that range equal that value, or only one of the cells has to equal that value?
Use COUNTIF instead, i.e.
Code:
=IF([COLOR=#ff0000]COUNTIF(I15:L15,"NA")=4[/COLOR],"NA",...
Make that type of change in the other spots of your formula too.
 
Upvote 0
I may have missunderstood what you are tying to do but, are cells I-l merged? If they are just use I15 not I15:L15. that should solve it.

If if they are 3 separate cells I would need a bit more info.
 
Upvote 0
Am I able to check that range for the 3 potential values Y,N,NA and return the corresponding values?
 
Upvote 0
Hi not quite sure what you want, are they 3 separate cells? Do all 3 cells give the same value every time?

If so just select 1 cell just simply use an = I 15 for example, if they all give separate answers, may have yo look at something more complicated��
 
Upvote 0
Am I able to check that range for the 3 potential values Y,N,NA and return the corresponding values?
COUNTIF allows you to count how many times a certain value appears in a range of cells.
So you can use it check to see if a particular value exists in ALL cells, one cell, no cells, etc.

To check for multiple values, you would just use multiple references to the formula, checking for each value separately.

If you need more help, please give more details, especially answering the questions we asked about what exactly you are trying to do (such as the question I asked about checking for a certain value in ALL the cells of your range, or just one; as well as the questions others asked).
 
Upvote 0
So each cell is separate, but with that said its likely that each cell will have the same value in it most of the time. Currently the way I have it setup is formulas in J-L that state if column I is N then each of the cells J-L populates NA so in the event column I has N and the rest have NA then M should be NA. Next if column I has Y in it then my formula in column M needs to address each column I-L and if it has all Y the M should be Y but if there's a single N then M should be N. Hope this helps.
 
Upvote 0
Your conditions seem a bit confusing, but maybe something like this:
Code:
[COLOR=#333333] =IF(COUNTIF(I15:L15,"NA")=4,"NA",IF([/COLOR][COLOR=#333333]COUNTIF(I15:L15,"N")>0[/COLOR][COLOR=#333333],"N",IF([/COLOR][COLOR=#333333]COUNTIF(I15:L15,"Y")>0[/COLOR][COLOR=#333333],"Y","")))[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,214,659
Messages
6,120,786
Members
448,992
Latest member
prabhuk279

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