Is "IF" what I want

eperry0303

New Member
Joined
Jul 7, 2009
Messages
5
Hi there, trying to figure out the best way to do this. I've used the "IF" before, but not sure if I can mak that work for this.

Column A is is whole numbers that range from -5 to about 100, and in column B, I want to insert a value 0-9, depending on which range the value of column A falls in. For example:

If column A<0, I want a "0" in column B
If column A is greater than 0 but less than or equal to 11, I want a "1" in column B
If column A is greater than 11 but less than or equal to 20, I want a "2" in column B...

And so on. Can I apply these multiple conditions (I'll have 10) to each cell in column A?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Are you sure of

If column A<0, I want a "0" in column B
If column A is greater than 0 but less than or equal to 11, I want a "1" in column B
If column A is greater than 11 but less than or equal to 20, I want a "2" in column B...

That doesn't seem consistant...

This will do
If column A<0, I want a "0" in column B
If column A is greater than 0 but less than or equal to 10, I want a "1" in column B
If column A is greater than 10 but less than or equal to 20, I want a "2" in column B...

=MAX(0,ROUNDUP(A1/10,0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,553
Members
452,928
Latest member
101blockchains

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