PC Review


Reply
Thread Tools Rate Thread

conditional formatting for a variable range

 
 
joemeshuggah
Guest
Posts: n/a
 
      2nd Jan 2009
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.
 
Reply With Quote
 
 
 
 
RadarEye
Guest
Posts: n/a
 
      2nd Jan 2009
On 2 jan, 05:39, joemeshuggah <joemeshug...@discussions.microsoft.com>
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting using variable text murkaboris Microsoft Excel Misc 4 31st Aug 2009 03:07 AM
conditional formatting using a variable laavista Microsoft Access Forms 2 28th Apr 2009 05:01 PM
Conditional Formatting In a Range =?Utf-8?B?bWlrZXN0ZXZlbg==?= Microsoft Excel Misc 1 13th Jul 2006 09:37 PM
Conditional Formatting (How to format a range depending on another range) Josh Rogers Microsoft Excel Discussion 2 6th Oct 2005 07:18 PM
Conditional data point formatting with variable conditions? Peter Frank Microsoft Excel Charting 3 23rd Nov 2004 09:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:54 PM.