• 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.

Coloring cells of a given range

lalhtt

New Member
Hi, This is my question. I want to color range of cells in a raw numbered 1 to 100. If I give two values in two cells ( say 43 & 67) in another location I need to color cells in that raw starting from number 43 to 67 (24 cells in same color) . Please advise which formula I can use for this. Thanks!
 
Hi,


You can use COnditional Formating for above.


New Rule

Format only cells that contain

Cell Value - Between - first number refrence - second number refrence.

Format the colour as per your requirement. Press OK.
 
Assume your data is in range A1:A10, the first row number is in C1, second row number is in D1, then

Define name as:

Data

=OFFSET(Sheet1!$A$1,Sheet1!$C$1-1,0,Sheet1!$D$1-Sheet1!$C$1+1,1)

In Range F1:F10 type = data (you will see that there are errors where rows from C1 & D1 doesn’t matches.

Based on F column you can give conditional formatting to A column, Please remember to remove the absolute reference while formatting.


Hope this assists.


Regards,

Indian
 
Lalhtt

As Meedan suggested use Conditional Formatting

Select the Range eg: A1:A100

Conditional formatting

New Rule

Use a Formula

=and(A1>=$D$1,A1<=$D$2)

Select Format

Apply


Assumes your 2 values are in D1, D2 and D1<D2
 
Back
Top