Conditional formatting based on a changing value

Sparky

Board Regular
Joined
Feb 18, 2002
Messages
210
Office Version
  1. 2010
Platform
  1. Windows
Hi

I have a row of blank cells (C1:C18). Above these are numbers 1 to 18.
In cell C19 I have a value that varies between 1 up to 18.

How do I conditionally format cells C1:C18 which are blank to display a colour if the value in C19 was for example 7?
I would then require C1:C7 to be highlighted in a colour and so on when the value changes again.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Select C1:C18, goto Format>Conditional formatting..., select Use a formula to determine which cells to format, enter this formula,

=ROW(C1)<=C$19

and set the formatting as required.
 
Upvote 0
Norie

Not working for me. Only the first cell is conditionally formatted.
 
Upvote 0
What's the exact formula you entered?
 
Upvote 0
Norie

I have just had a look at what has been initially posted. It should read row C2:T2. The numbers above these are 1 through to 18 in cells C1:T1.
In cell U2 there is a changing value based on a sum that will never go above 18 but will vary from zero to 18.
 
Upvote 0
The formula entered is as you posted.

Thanks for your time.
 
Upvote 0
Select C2:U2, goto Forma>Conditional formatting..., Use formula to determine..., enter this formula,

=COLUMN(C2)-2<=$U2

and format as required.
 
Upvote 0

Forum statistics

Threads
1,223,716
Messages
6,174,069
Members
452,542
Latest member
Bricklin

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