0

HELP! I'm getting a "too many arguments for this function" error.

=IF(B13>149,000,"T1",IF(B13>180,000,"T2",IF(B13>210,000,"T3",IF(B13>240,000,"T4",IF(B13>270,000,"T5",IF(B13>300,000,"T6"))))))

4
  • 1
    What programming language do you use? Commented Feb 27, 2020 at 18:58
  • 1
    Why do you have the commas in the numbers? 149,000 should just be 149000 Commented Feb 27, 2020 at 18:58
  • Or is this excel..? Commented Feb 27, 2020 at 18:58
  • Thanks, I removed the numbers however, I'm still not getting the result I want. My B13 cell has a value of $244,000 which should be assigned a T4. However, the formula is stopping at the first argument and assigning a T1. Any idea how I fix this? Commented Feb 27, 2020 at 20:02

1 Answer 1

1

Remove the commas from the numbers; Excel thinks "comma" means "new argument." Like this...

=IF(B13>149000,"T1",IF(B13>180000,"T2",IF(B13>210000,"T3",IF(B13>240000,"T4",IF(B13>270000,"T5",IF(B13>300000,"T6"))))))

...but your code will still not do what you want it to do because assuming B13 is greater than 149000, we'll never get past evaluating your first IF and setting to T1, because it looks like the function parser stops after it finds a true condition (like B13 being greater than 149000; whether or not other IFs in your function would also evaluate to true doesn't matter to Excel - it already found a true condition). The solution is to reverse the order, like this:

=IF(B13>300000,"T6",IF(B13>270000,"T5",IF(B13>240000,"T4",IF(B13>210000,"T3",IF(B13>180000,"T2",IF(B13>149000,"T1"))))))
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, that worked, however, I'm still not getting the result I want. My B13 cell has a value of $244,000 which should be assigned a T4. However, the formula is stopping at the first argument and assigning a T1. Any idea how I fix this?
I see the issue; will edit my answer to reflect this
@JarrodTurner edited my answer to reflect your other issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.