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!
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,916
Office Version
  1. 365
Platform
  1. Windows
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).
 

krazykn

New Member
Joined
Feb 19, 2016
Messages
3
Joe4 - It works flawlessly, you're guinesses is contagious!
Thanks a bunch!
K
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,916
Office Version
  1. 365
Platform
  1. Windows
You are most welcome.
Glad it all worked out for you!:)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,509
Messages
5,596,561
Members
414,077
Latest member
ammylar5

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
Top