Simplify Numbers multiple if formula

I have made this formula to validade different conditions


IF(AND(SUM(N53:R53)=2;SUM(T53:U53)=0);"2";)+IF(AND(SUM(N53:R53)=1;SUM(T53:U53)=2);"12";)+IF(AND(SUM(N53:R53)=2;SUM(T53:U53)=1);"21";)+IF(AND(SUM(N53:R53)=2;SUM(T53:U53)=2);"22";)+IF(AND(SUM(N53:R53)=3;SUM(T53:U53)=0);"3";)+IF(AND(SUM(N53:R53)=3;SUM(T53:U53)=1);"31";)+IF(AND(SUM(N53:R53)=3;SUM(T53:U53)=2);"32";)+IF(AND(SUM(N53:R53)=4;SUM(T53:U53)=0);"4";)+IF(AND(SUM(N53:R53)=4;SUM(T53:U53)=1);"41";)+IF(AND(SUM(N53:R53)=4;SUM(T53:U53)=2);"42";)+IF(AND(SUM(N53:R53)=5;SUM(T53:U53)=0);"5";)+IF(AND(SUM(N53:R53)=5;SUM(T53:U53)=1);"51";)+IF(AND(SUM(N53:R53)=5;SUM(T53:U53)=2);"52";)



It basically looks here to validade those conditions

Is there a way to write it in less amount of code using another function?

Posted on Sep 8, 2022 6:39 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 8, 2022 7:24 AM

Your results "31", "32" etc should not be in quotes but that is a side point to the answer to your question. It makes them strings. As numeric characters, Numbers turns them into numbers for the additions you are making but, in general, using + on a string is an error.


I can give a close answer but probably not a full answer. Not trying to muddy the waters but the problem is not fully defined.

  • I assume you want the answer to be a number, not a string of numeric digits. There is a difference.
  • I don't know if you really mean SUM or if you want COUNT or COUNTIF. I used SUM but if you put a number larger than 1 in any of those cells it will sum that number. COUNT will count how many cells have anything numeric in them. COUNTIF can count the number cells that have a 1, ignoring anything else. Or you could use checkboxes and then COUNTIF can count the number of checked boxes (cell = true).
  • I don't know what to do if SUM(N53:R53) is 0. The result will be 0 in the formula below.
  • In the formula below, if SUM(N53:R53)=4 and SUM(T53:U53)=0 the answer will be 4 (as in your screenshot) but it will also be 4 if SUM(N53:R53)=0 and SUM(T53:U53)=4


Anyway, maybe this formula will get you on a different track to solving your problem:

=IF(SUM(T53:U53)>0; SUM(T53:U53)+10×SUM(N53:R53);SUM(N53:R53))


You should also look at the IFS function if you need addition conditions in this formula, like for when SUM(N53:R53)=0.


(Edited to change commas to semicolons in the formula)


19 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Simplify Numbers multiple if formula

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.