Format a row based on a cells value (1 Viewer)

MaleNurse

New member
Local time
Today, 05:56
Joined
Aug 5, 2022
Messages
2
Ok Cell O4 is a calculated age.
Range C8:C17 is age ranges

18-24
25-29
30-34
35-39
40-44
45-49
50-54
55-59
60-64
65+

Id like to be able to highlight the row based on the value in O44

Can this be done?

Thanks Guys
Steve
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:56
Joined
May 7, 2009
Messages
16,874
can you use VBA?
here i created VBA together with Conditional Formatting.
 

Attachments

  • testing.zip
    13 KB · Views: 13

Isaac

Lifelong Learner
Local time
Yesterday, 21:56
Joined
Mar 14, 2017
Messages
6,680
It is not necessary to resort to VBA, this can be done using standard Excel.

For example, if you wanted to format an entire row based on the value in column B being > 5.

Select all involved cells in the first row of data (say, it might be A2:F2)
Go to conditional formatting > New Rule
Select the "Use a Formula" option
Enter this formula: =$B2 > 5
Choose your desired Formatting, and complete the dialogue box Ok, Apply, etc

Now make sure A2:F2 is still selected, or select it again.
Click Ctrl+C to COPY
Now select the rest of your cells (below) - say, it might be A3:F20
Right click > Paste Special > Paste Formats

This will paste the conditional formatting in a "relative" / dynamic way - where each row's Conditional Formatting will understand that their format is depending on the value in B# , where # is the row you are on.

This is my standard way of applying conditional formatting that's dependent on the location of the cell.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:56
Joined
May 7, 2009
Messages
16,874
It is not necessary to resort to VBA, this can be done using standard Excel.
read and Understand post#1, Cell O4 is calculated and is Dynamic.
how can you apply your CF based on O4 which is dynamically changing?
 

Users who are viewing this thread

Top Bottom