I would like to set a multiple IF statement for my formula. The reason behind it is, that I need to switch off the values (mark them as N/A and NA) which are equal to the other certain values as follows:
LP372/24/60+1=($NO372-720)/24/60+1 => mark them as N/A - the values, which don't happen during the midnight
and
LP372/24/60+1=$NO372/24/60+1 => mark them as NA - the values, that don't happen during the midday
The problem is, that I can't keep them under one IF statement, because I need the division.
So far I used only one IF statement (the nested one), which looks as follows:
=IF(OR((LP372/24/60+1)=(($NO372-720)/24/60+1), OR((LP372/24/60+1)=($NO372/24/60+1))),"N/A",LP372/24/60+1).
The value of NO372 corresponds to the rough time of the local midday. Substracting the 720 we are getting the rough midday for this location, knowing that the single day counts 24 hours x 60mins = 1440mins.
The formula above gives a nice result, but without the division between midday and midnight, which I am talking about.
Following my older query about the similar issue:
Double nested IF statement formula in Excel
I tried to solve it like this:
=IF(COUNTA(E1116:E1481),IF(OR((LP372/24/60+1)=(($NO372-720)/24/60+1),OR((LP372/24/60+1)=($NO372/24/60+1))),"N/A",LP372/24/60+1),"NA")
where the range E1116:E1481 corresponds to the whole year period (1.01 - 31.12). Unfortunately I got nothing, similarity to this formula:
=IF(COUNTA(E1116:BC1116),IF(OR((LP372/24/60+1)=(($NO372-720)/24/60+1),OR((LP372/24/60+1)=($NO372/24/60+1))),"N/A",LQ510/24/60+1),"NA"),
where the E:1116:BC1116 range correspond to the all columns - circumstances as occur on January 1. This formula was still not correct.
I found something on the web about the multiple IF statements:
which led me to the following formula
=IF((LP372/24/60+1)=(($NO372-720)/24/60+1);"N/A";IF((LP372/24/60+1)=($NO372/24/60+1);"NA")LP372/24/60+1)
Unfortunately again not correct.
The last attempt was an answer provided here:
Multiple IF statements in Excel
on which basis I built up another formula
=IF((LP372/24/60+1)=(($NO372-720)/24/60+1),"N/A",LP372/24/60+1,IF((LP372/24/60+1)=($NO372/24/60+1),"NA"))
this time Excel said, that I've entered too many arguments.
Is there a way to set up multiple IF statements? I need to:
- make the values equal to midnight as N/A,
- make the values equal to midday as NA
- keep the other values as they stand

=IF(OR(HOUR(B19)=12,HOUR(B19)=0),"N/A",B19)? this checks the hour of the cell (in this case B19) and if the hour is 0 or 12 (midnight or noon) you getN/A, else you get the value of the cell.FALSEif you are copying and pasting my formula exactly into your sheet. If you are trying to use my formula as part of another formula that could result in you gettingFALSE. How are you trying to implement my formula? can you post the exact final version of the formula you are using as well as the value in the cell you are examining?IFstatement in the formula in the last comment does not have the final value in it. if the formula works other than just that here is the version that points out where to put the reference to your cell you want the timestamp from:=IF((LP372/24/60+1)=(($NO372-720)/24/60+1),"N/A",IF((LP372/24/60+1)=($NO372/24/60+1),"NO","your timevalue cell reference goes here"))IFstatements, what I do when doing something like that is when adding a newIFstatement, I type the structure out first like this:IF( , , )because eachIFstatement has 3 parts inside the parens: first is the condition you are checking against, second is what you want if that condition is true, third is what you want if the condition is not true. the reason you were gettingFALSEis because you were leaving out the third part in theIFstatement. so, because you didn't give that final value, it just displayedFALSE