conditional formatting for a variable range

J

joemeshuggah

is it possible to program to conditionally format a variable range of cells?

would like to look at values in column a...if criteria are met, then apply
conditional formatting to the cell in column g...where the conditional
formatting references only the cells in column g where the formatting is
applied.

for example, column a is group name and column g is total tasks completed.

if cells a4, a9, and a13 meet the criteria (e.g. group names specified in
the macro), then conditional formatting is applied to cells g4, g9, and g13
where the conditional formatting that is applied refences g4, g9, and g13 so
as to find highlight the cell with the maximum tasks completed for only these
three cells.
 
R

RadarEye

is it possible to program to conditionally format a variable range of cells?

would like to look at values in column a...if criteria are met, then apply
conditional formatting to the cell in column g...where the conditional
formatting references only the cells in column g where the formatting is
applied.

for example, column a is group name and column g is total tasks completed.

if cells a4, a9, and a13 meet the criteria (e.g. group names specified in
the macro), then conditional formatting is applied to cells g4, g9, and g13
where the conditional formatting that is applied refences g4, g9, and g13 so
as to find highlight the cell with the maximum tasks completed for only these
three cells.

Hi there,

In Excel2003 I have created this function:

Public Function CheckGroupName(GroupName As Range) As Boolean
'Application.Volatile
CheckGroupName = GroupName.Value = "First" Or _
GroupName.Value = "Second"
End Function

In Cells G4 for conditial formating I used thr option Formula Is
and as formula "=CheckGroupName(A4)"

HTH,

Wouter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top