Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting in range VLOOKUP fORMULA Excel Discussion (Misc queries) 1 December 17th 09 03:24 PM
Conditional Formatting with range Keyrookie Excel Worksheet Functions 2 December 3rd 09 02:20 PM
Conditional Formatting using variable text murkaboris Excel Discussion (Misc queries) 4 August 31st 09 03:07 AM
Conditional formatting a range WLMPilot Excel Programming 5 March 4th 08 03:10 PM
Conditional Formatting Range Dan Excel Programming 3 December 16th 04 03:58 PM


All times are GMT +1. The time now is 11:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"