![]() |
conditional formatting for a variable range
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. |
conditional formatting for a variable range
On 2 jan, 05:39, joemeshuggah
wrote: 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 |
All times are GMT +1. The time now is 05:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com