how to get a number based on a color

streamer1234

New Member
Joined
Nov 27, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hey,

so I'm trying to figure out how to get a number based off a percentage to match with a color, if that makes sense lol.

ex: 0% to 20% = 1
21%-40% = 2
41% to 60% = 3
61% to 80% = 4
90% to 100% = 5

i have the conditional formatting a color scale already based of the percentage but cant figure out how to get a number to associate to it.

I've attached a photo to give an idea, please help lol

thanks - A
 

Attachments

  • Screenshot 2024-12-20 142918.png
    Screenshot 2024-12-20 142918.png
    21.2 KB · Views: 5

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Is this what you wanted? If so, replace the color with your own.
Book1
BC
40,00%
50,00%
640,00%
70,00%
880,00%
950,00%
1095,00%
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4:C10Expression=$B4<=20%textNO
C4:C10Expression=$B4<=40%textNO
C4:C10Expression=$B4<=60%textNO
C4:C10Expression=$B4<=80%textNO
C4:C10Expression=$B4<=100%textNO
 
Upvote 0
These are conditional formatting rules (see the photo).
View attachment 120537
yes i already have that section done, what im trying to do is if its red in column C4, it would place #1 in C4, and if its yellow in c11 then it would but a 3 in the same spot. so even if the numbers go up or down itll match color to the formula plus have the correct # to the color, like a rating
 
Upvote 0
Is this what you wanted?
mrexcel.xlsx
BCDEFGH
112345
2
3
40,00%1
50,00%1
640,00%2
70,00%1
880,00%4
950,00%3
1095,00%5
Sheet1
Cell Formulas
RangeFormula
C4:C10C4=IFS($B4<=20%,$D$1,$B4<=40%,$E$1,$B4<=60%,$F$1,$B4<=80%,$G$1,$B4<=100%,$H$1)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4:C10Expression=$B4<=20%textNO
C4:C10Expression=$B4<=40%textNO
C4:C10Expression=$B4<=60%textNO
C4:C10Expression=$B4<=80%textNO
C4:C10Expression=$B4<=100%textNO
 
Upvote 0
Is this what you wanted?
mrexcel.xlsx
BCDEFGH
112345
2
3
40,00%1
50,00%1
640,00%2
70,00%1
880,00%4
950,00%3
1095,00%5
Sheet1
Cell Formulas
RangeFormula
C4:C10C4=IFS($B4<=20%,$D$1,$B4<=40%,$E$1,$B4<=60%,$F$1,$B4<=80%,$G$1,$B4<=100%,$H$1)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4:C10Expression=$B4<=20%textNO
C4:C10Expression=$B4<=40%textNO
C4:C10Expression=$B4<=60%textNO
C4:C10Expression=$B4<=80%textNO
C4:C10Expression=$B4<=100%textNO
YES! lol I've tried to use it but it doesn't seem to be working, can i see how you have it in the conditional part?
 
Upvote 0
Create the rules for conditional formatting, and then write the formula in the C4 cell and stretch for the number of cells that you need.
Excel Formula:
=IFS($B4<=20%;$D$1;$B4<=40%;$E$1;$B4<=60%;$F$1;$B4<=80%;$G$1;$B4<=100%;$H$1)
Here are the screen of conditional formatting rules
Screenshot 2024-12-21 012821.png
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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