Related:

- Excel change font color based on value of another cell
- Excel change text color based on value of another cell - Best answers
- Excel change text color based on value - Best answers
- Change color to different cells based on another cells text. ✓ - Forum - Excel
- Format fill colour based on another cell ✓ - Forum - Excel
- Changing a cell value based on the color of a ✓ - Forum - Office Software
- Change cell color based on input in a range of cells ✓ - Forum - Excel
- How to use conditional format based on text? ✓ - Forum - Excel

Zohaib R

- Posts
- 2400
- Registration date
- Sunday September 23, 2012
- Status
- Moderator
- Last seen
- December 13, 2018

Hi wandanuila,

Please use the below-mentioned steps to use a formula in conditional formatting to define the rule:

1. Select the cell B1.

2. Click Conditional Formatting from the top ribbon.

3. Select New Rule.

4. Click Use a formula to determine which cells to format.

5. Enter the below-mentioned formula in Format values where this formula is true: =AND(1<=$B$8, $B$8<=10)=TRUE

6. Click "Format" and select the Fill Color as Green.

7. This formula will change the back color of Cell B1 to green if the value is from 1 to 10.

8. To change the back color of Cell B1 to Blue if the value is from 11 to 20 repeat steps 1 through 6, only change the formula in step 5 as:

=AND(11<=$B$8, $B$8<=20)=TRUE

Also select the Fill Color as Blue.

9. To change the back color of Cell B1 to Red if the value is Greater than 20, repeat steps 1 through 6, only change the formula in step 5 as:

=$B$8>20=TRUE

Also select the Fill Color as Red.

For your convenience, I have uploaded the sample file here. This file was prepared using Microsoft Excel 2010.

Please revert for any clarification!

Thanks & Regards

Zohaib R

#iworkfordell

Please use the below-mentioned steps to use a formula in conditional formatting to define the rule:

1. Select the cell B1.

2. Click Conditional Formatting from the top ribbon.

3. Select New Rule.

4. Click Use a formula to determine which cells to format.

5. Enter the below-mentioned formula in Format values where this formula is true: =AND(1<=$B$8, $B$8<=10)=TRUE

6. Click "Format" and select the Fill Color as Green.

7. This formula will change the back color of Cell B1 to green if the value is from 1 to 10.

8. To change the back color of Cell B1 to Blue if the value is from 11 to 20 repeat steps 1 through 6, only change the formula in step 5 as:

=AND(11<=$B$8, $B$8<=20)=TRUE

Also select the Fill Color as Blue.

9. To change the back color of Cell B1 to Red if the value is Greater than 20, repeat steps 1 through 6, only change the formula in step 5 as:

=$B$8>20=TRUE

Also select the Fill Color as Red.

For your convenience, I have uploaded the sample file here. This file was prepared using Microsoft Excel 2010.

Please revert for any clarification!

Thanks & Regards

Zohaib R

#iworkfordell

Zohaib R

- Posts
- 2400
- Registration date
- Sunday September 23, 2012
- Status
- Moderator
- Last seen
- December 13, 2018

Hi,

I apologize to both Rona and rizvisa1 for replying this late to this post. Rona, I have prepared for you an excel sheet which has a drop down in cell A1 to select colors and you will see corresponding change in B1. You can download the sheet from the below mentioned link:

http://speedy.sh/82PHJ/RGBFile.xlsx

I have prepared this sheet using Microsoft Excel 2010. If you have another version of Microsoft Excel, it might not open correctly. If you face any such problem, please reply with the version of Microsoft Excel installed in your computer and I will post the step by step method.

Do reply with results.

Thanks & Regards

Zohaib R

#iworkfordell

I apologize to both Rona and rizvisa1 for replying this late to this post. Rona, I have prepared for you an excel sheet which has a drop down in cell A1 to select colors and you will see corresponding change in B1. You can download the sheet from the below mentioned link:

http://speedy.sh/82PHJ/RGBFile.xlsx

I have prepared this sheet using Microsoft Excel 2010. If you have another version of Microsoft Excel, it might not open correctly. If you face any such problem, please reply with the version of Microsoft Excel installed in your computer and I will post the step by step method.

Do reply with results.

Thanks & Regards

Zohaib R

#iworkfordell

I know this is outdated but I am trying to do the same thing but with a letter rather than a range of numbers