• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Formatting number of columns based on value on other cell

samtheman

New Member
I want to format no. of columns (via conditional formatting) based on the value of other cell. Eg:if cell H1=1, Format (let's say, with yellow background) Column A only; if H1=2, format Columns A & B;if H1=3, format Column A,B & C; if H1=4, Format Columns A,B,C & D and so on.
 
With all the cells selected, CF formula is:

=COLUMN()<=$H1

Pick desired fill color, ok out.
 
Amazing!

Thank you very much.

Slight change to your formula:

=COLUMN()<=$H$1

This will help to format all the rows in the column.


Your formulae will format the 1st row of the column only.


Great!

Thank you again.
 
Back
Top