1

I'm trying to write an IF statement for whether an engine size is small (900 - 1400), medium (1401 - 2000) or large (>2000).

The engine sizes are in the B column.

I'm not really sure how to approach this. What I've currently written keeps returning an error:

=IF(AND(B2>=900;B2<=1400);"Small"), IF(AND(B2>=1401;B2<=2000);"Medium"), IF(B2>=2001),"Large"

I'd really appreciate it if anyone could point out what I'm doing wrong.

1
  • Welcome to Web Applications. Please add the textual error that you are getting. P.S. The formula is mixing ; and , as parameter separator... you should use the one that corresponds to the regional setting of your spreadsheet i.e. use , for U.S., ; for Spain
    – Rubén
    Nov 29 '21 at 21:31
1

Use ifs(), like this:

=ifs( 
  not(isnumber(B2)); iferror(1/0); 
  B2 < 900; "(leptonic)"; 
  B2 <= 1400; "Small"; 
  B2 <= 2000; "Medium"; 
  true; "Large" 
)
1
  • Thank you so much for this! Worked a charm. I hadn't considered the IFS statement! Nov 29 '21 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.