Writing Formula To Label Data

robertsgw

New Member
Joined
Aug 30, 2011
Messages
31
Office Version
  1. 365
Hello. I am trying write a formula that will label data based on a range of number. I was thinking of using an ifs statement, but can't figure out how to make it work. I want to label any data between 4000000 and 499999 as Blue, number 510000 as Green, 520000 as red and then any other number outside of this range as other. Any tips?

Also can you write a sumifs formula where the criteria is a range not a specific number?

Thanks,
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
What is your version of Excel?

Are you just looking for the words Blue, Green, Red & Other to be added in a column next to the data or do you want the cells to change colour?
 
Upvote 0
What is your version of Excel?

Are you just looking for the words Blue, Green, Red & Other to be added in a column next to the data or do you want the cells to change colour?
I am looking for the words to be added in a column next to the data.
 
Upvote 0
What is your version of Excel: 2016, 365...?
 
Upvote 0
If you click on File, Account you will be able to see what you are using.

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
If you click on File, Account you will be able to see what you are using.

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Thank you for the tip. I am using 365.
 
Upvote 0
Assuming your value is in D5 for example, you can try something like this:
=LET(color,LOOKUP(D5,{0,"Other";400000,"blue";500000,"";510000,"Green";51000,"";520000,"Red"}),IF(color="","Other",color))
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,839
Members
449,193
Latest member
MikeVol

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