SOLVED

# IF Function Question

How do I combine a string of IF AND/OR commands?

Example: =IF(AND(C4<25, 3.25)), IF(AND(C4>25,C4<50, 2.5))

I need to continue the command for 6 more

6 Replies

# Re: IF Function Question

Perhaps

=IFS(C4<25, 3.25, C4<50, 2.5, next condition, next return value, ...)

Or use a lookup function: # Re: IF Function Question

@Hans Vogelaar Thank you for your help.  This worked for me, with the exception of the last condition that I needed to be greater than 3000. When I tried C12>3000, 1.3, it would give me a N/A error.  To eliminate the error, I had to change the 3000 to 1.  Then my calculation worked.  Can you help me with an explanation?

# Re: IF Function Question

It should work: Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?

# Re: IF Function Question # Re: IF Function Question

You should use either C11>=3000 here, or simply TRUE:

=IFS(C11<25, 3.25, C11<50, 2.5, C11<75, 2.25, C11<500, 1.9, C11<1000, 1.55, C11<2000, 1.45, C11<3000, 1.35, C11>=3000, 1.25)

or

=IFS(C11<25, 3.25, C11<50, 2.5, C11<75, 2.25, C11<500, 1.9, C11<1000, 1.55, C11<2000, 1.45, C11<3000, 1.35, TRUE, 1.25)

best response confirmed by mjosetectaamericacom (New Contributor)
Solution

# Re: IF Function Question

This one works:
=IFS(C11<25, 3.25, C11<50, 2.5, C11<75, 2.25, C11<500, 1.9, C11<1000, 1.55, C11<2000, 1.45, C11<3000, 1.35, C11>=3000, 1.25)