IF( major to minor range values)

Occasional Contributor

Lorenzo_Masotti_1-1676124343180.png Dear Mrs, I used the formula IF ( italian SE) to order the temperatures values so if different values come from first column(theta,r,w) I will have a specific theta,f. But I dind't find clear how to conclude the formula, because the equal sign, after minor/major also other unspecified problems don't convert my cells in the right values " TRUE") which I 've written on Excel.

Do you have any answer?

Best Regards,


Lorenzo Masotti




8 Replies


The error is in using expressions like

= 11<value<=12

to determine whether a value lies between 11 and 12.  It is evaluated left to right with

= 11<value

returning TRUE or FALSE.  Either way

= TRUE<=12 or

= FALSE<=12

evaluates to FALSE.


Your test could be

= AND(11<value, value<=12)

or, somewhat more obscure,

= XOR(value<={11,12})


IFS would be better than nested IF statements and a table lookup would be better again.

Thank you Peter, I think with Office 2016 I cannot try IFS. So I'm trying to use the nasted option. If you use AND, which mode to list the logical parameters is right with and/or and if? for Example let say I use your advice := AND(11<value, value<=12)

But In this formula I noticed that, out from the first bracket parameters,all cells are made by the grey/black color which means not correct order. Which is the right manner to dispone IF and E together without IFS?

I written IF(AND(1condition,2cond;3cond); 1310 should be recognizable
IF( 1 condition, AND(2,3 condition); IF true; IF False/NEW IF would not.

Did I have to buy new Office? I ll do it. Thank you Peter


Since you plan to use the nested IFs, bear in mind that the AND function needs to be closed

= IF(AND(DG29<7;DG29=>6);CX29=50; ... )

= IF((DG29<7)*(DG29=>6);CX29=50; ... )

and you need to use the ";" as a separator as you do elsewhere.  You could also use multiplication as an equivalent to AND, since a product evaluates to 0 (i.e. FALSE) if either term is zero.  In the main, your criteria do not need two terms because, simply getting to evaluate a condition implies that part of the condition is satisfied since it failed the previous test.


As for a new Office, I would recommend 365 at least until the pace of change settles down.  It is backward compatible so it will run legacy solutions but its strength lies in the completely new methods that it supports.  My normal solutions bear so little resemblance to traditional Excel that I am probably regarded as completely insane by the majority on the forum!  I would stop using spreadsheets completely if I ever had to go back.

I now settle down the 365 Office Annual. Did you meanfor spreadsheets, for example, Libre Office and similar? ( I collected in fact various bugs or problems).


I just use the desktop version because, for me, the use of defined names is essential.  I work with dynamic array formulas all the time and almost all of my formulas involve LET and LAMBDA.

Use what you know and take gentle steps to get your day job done, but read up and practice the new methods when you can.

Thank you Peter Here What I found trying the steps before.
Even I close the brackets, Excel says: " There are too many arguments", without specifies the discipline of them. I reported to you the second case where I used the multiplication factor instead of and. But in this case It says it contains an error.:
SE((6<=DG29)*(DG29<7);CX29=50);1310;SE((50<=CX29)*(DG29<55)*(7<DG29);DG29<=8;1225);SE((8< DG29)*(DG29<=9);CX29>45;1265;SE((10<DG29)*(DG29<=11);CX29<45;1305;SE((12<DG29)*(DG29<=13);CX29>45;1346;))))))))
Peter, I tried with the new subscription:
=PIÙ.SE(E(CX29<= 50;DG29<7) DG29<=6;1310; E(CX29=>45;CX29<50;DG29<7) DG29 =<8;1225; (E(DG29>8; DG29<=9)CX29<=50;1265;(E(DG29>10; DG29<=11)CX29<=50;1305;E(DG29>12; DG29<=13) (CX29<=50;1346;"NO"))))) Actually is not working eather.. Any reason?


Sorry, not one error, many errors.



=   IF(    ( 6 < x) * (x <=  7) * (v = 50),                  1310,
    IF(    ( 7 < x) * (x <=   * (50 <= v) * (v < 55),      1225,
    IF(    ( 8 < x) * (x <=  9) * (v > 45),                  1265,
    IF(    (10 < x) * (x <= 11) * (v < 45),                  1305,
    IF(    (12 < x) * (x <= 13) * (v > 45),                  1346, 



[Note: one of the lines is messed up by the editor]

I tried to lay out your solution, correcting as I went, to see what you are trying to do.  Why is there no result for values of x between 9 and 10?

IFS would improve the formula but I think laying is out as a table with x going up in ones down the rows and v changing in 5s across the top.  For a particular (x, v) match the headers to get the row and column indices and return the value using the INDEX function.


If you are using the 365 that would allow you to use the IFS but XMATCH/INDEX would probably be better.  XLOOKUP could also be used.