Conditional Formatting based on corresponding cell input

krazykn

New Member
Joined
Feb 19, 2016
Messages
3
I like to create a formula for conditional formatting base on value from another cell

A1=Input numbers between 1-10
A2:A11 = shaded/filled based on value from cell A1

Example
If A1=3
A2:A4 is shaded/filled

If A1=5
A2:A6 is shaded/filled

If A1=8
A2:A10 is shaded/fill

Any tips/solution would be greatly appreciated.
Cheers!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Welcome to the Board!

Highlight cells A2:A4, and then go to Conditional Formatting, enter the following formula:
=$A$1=3
and then apply the Conditional Formatting option you want to use.

Repeat the steps for your other two ranges.

Note: Where you have multiple Conditional Formatting formulas being applied to the same cells, you will need to prioritize to decide which conditions should be checked first. After you apply all the Conditional Formatting, you can go back in to it, view all your Criteria, and re-order it any way you like (remember, with Conditional Formatting, if there are multiple conditions, once a condition is met, it stops there and will not look at any other conditions ranked below it).
 
Upvote 0
You are most welcome.
Glad it all worked out for you!:)
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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