The nested if
statement I've tried writing keeps returning an error but I can't see where. I've seen similar threads but none with a workable syntax. I've tried with and without the and
statement. Very simply looking at the value in a cell (C5) and returning a corresponding value-based what the number in C5 is.
=if(C5>84.5,1,if(and(C5<=84.5,C5>79.5,1.3,if(and(C5<=79.5,C5>74.5,1.7,if(and(C5<=74.5,C5>69.5,2,if(and(C5<=69.5,C5>64.5,2.3,if(and(C5<=64.5,C5>59.5,2.7,if(and(C5<=59.5,C5>54.5,3,if(and(C5<=54.5,C5>49.5,3.3,if(and(C5<=49.5,C5>44.5,3.7,if(and(C5<=44.5,C5>=40,4,if(C5<40,5))))))))))))))))))))
I expect the output to range from 1 to 5 depending on what the value in cell C5 is but I keep getting the following error
Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 1 argument
Aucun commentaire:
Enregistrer un commentaire