Help with Nested "If greater than, but less than" statement

ChromeX

New Member
Joined
Mar 10, 2023
Messages
1
Office Version
  1. 365
Hi

I'm struggling with this nested IF statement. I need to my data set to tell me if
  1. The value is less than 1000, I need the result to display "1"
  2. If the value is above 1000, but less than 2000, to display "2"
  3. If the value is above 2000 but less than 3000, to display "3"
  4. If the value is above 3000 to display "error"
My statement involves one sell "K20"
My statement is as follows

=IF(K20<1000,"1","1"),IF(AND(K20>1000,K20<2000),"2","1"),IF(AND(K20)(K20>2000,K20<3000),"3","1"),IF(K20>3000,"error","error")

Any suggestion on how to correct this please?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
=IF( cell with value in < 1000 , 1, if( cell value less than 2000 ,2, if( cell value < 3000 , 3 , "Error") ))

as it has already tested if below 1000 - ith then goes right and next test is below 2000 but has to be 1000 or more , as its already checked if under 1000

But
what if it equals 1000, 2000, 3000 exactly , 1 2 or 3 or error ?

also blank cells - will be 1 as below 1000
maybe add

=IF(value ="", "" , IF( value < 1000 , 1, if( value less than 2000 ,2, if( value < 3000 , 3 , "Error") )))

i didnt see the formula stange

=IF(K20<1000,1, IF(K20<2000, 2,IF(K20<3000,3,"error")))

Note putting "" around numbers "1" changes them to text
 
Last edited:
Upvote 0
try:
Excel Formula:
=IF(K20<1000,1,IF(K20<2000,2,IF(K20<3000,3,"ERROR")))
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top