Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Help with Conditional Formatting Please

Hi,

I have Two Columns C & D with Data.
The Cells with Data in Column D are Highlighted for MIN in Red and MAX
in Blue.
I would like the Cell in Column C that is to the Left of the Highlighted
MIN Value in Column D to ALSO be Coloured Red, and the Cell in Column C
that is to the Left of the Highlighted MAX Value in Column D to be
Coloured Blue.

Any Help will be Greatly Appreciated.

All the Best.
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Help with Conditional Formatting Please

Hi,

this will highlight required cells. Change rng1 to suit your data

Dim rng1 As Range, minx As Long, maxx As Long

Set rng1 = Range("D1:D" & Range("D" & Rows.Count).End(xlUp))

minx = rng1.Cells(Application.Match(Application.Min(rng1) , rng1, 0)).Row
Cells(minx, "D").Interior.ColorIndex = 3
Cells(minx, "C").Interior.ColorIndex = 3


maxx = rng1.Cells(Application.Match(Application.Max(rng1) , rng1, 0)).Row
Cells(maxx, "D").Interior.ColorIndex = 41
Cells(maxx, "C").Interior.ColorIndex = 41

HTH


"Paul Black" wrote:

Hi,

I have Two Columns C & D with Data.
The Cells with Data in Column D are Highlighted for MIN in Red and MAX
in Blue.
I would like the Cell in Column C that is to the Left of the Highlighted
MIN Value in Column D to ALSO be Coloured Red, and the Cell in Column C
that is to the Left of the Highlighted MAX Value in Column D to be
Coloured Blue.

Any Help will be Greatly Appreciated.

All the Best.
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Conditional Formatting Please

Put in the same formulas in column C as you have in column D - make sure
they refer to column D and not column C.

--
Regards,
Tom Ogilvy

"Paul Black" wrote in message
...
Hi,

I have Two Columns C & D with Data.
The Cells with Data in Column D are Highlighted for MIN in Red and MAX
in Blue.
I would like the Cell in Column C that is to the Left of the Highlighted
MIN Value in Column D to ALSO be Coloured Red, and the Cell in Column C
that is to the Left of the Highlighted MAX Value in Column D to be
Coloured Blue.

Any Help will be Greatly Appreciated.

All the Best.
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help with Conditional Formatting Please

Paul,

Select column C & D, and in the CF formua, use

=$C1=MAX($C:$C)

and

=$C1=MIN($C:$C)

note the $ signs

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Paul Black" wrote in message
...
Hi,

I have Two Columns C & D with Data.
The Cells with Data in Column D are Highlighted for MIN in Red and MAX
in Blue.
I would like the Cell in Column C that is to the Left of the Highlighted
MIN Value in Column D to ALSO be Coloured Red, and the Cell in Column C
that is to the Left of the Highlighted MAX Value in Column D to be
Coloured Blue.

Any Help will be Greatly Appreciated.

All the Best.
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Help with Conditional Formatting Please

Thanks Tom & Bob for the Replies.

I have Tried Both Suggestions But Unfortunately they do Not give me the
Correct Results.
The Formulas I am Using in Conditional Format for Column D are :-

Cell Value is Equal to =Min($D$4:$D$305)
Cell Value is Equal to =Max($D$4:$D$305)

The Values in Column C are NOT Sequential so I think that this might be
Part of the Problem.

Thanks in Advance.
All the Best.
Paul



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Conditional Formatting Please

Bob has given you the correct formulas. Select columns C and D as
instructed. (C1 or D1 should be the activeCell) Then When you go to
format=Conditional formatting, change the first dropdown from Cell Value is
to Formula is, then enter Bob's first formula. Set the formatting, then add
a formula and repeat

Order has no affect on whether the value of a cell matches a test value.

--
Regards,
Tom Ogilvy

"Paul Black" wrote in message
...
Thanks Tom & Bob for the Replies.

I have Tried Both Suggestions But Unfortunately they do Not give me the
Correct Results.
The Formulas I am Using in Conditional Format for Column D are :-

Cell Value is Equal to =Min($D$4:$D$305)
Cell Value is Equal to =Max($D$4:$D$305)

The Values in Column C are NOT Sequential so I think that this might be
Part of the Problem.

Thanks in Advance.
All the Best.
Paul



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Conditional Formatting Please

Actually, Bob has given you formulas for the min and max values in column C.
For D as you described, change them to:

=$D1=MAX($D:$D)

and

=$D1=MIN($D:$D)


--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
Bob has given you the correct formulas. Select columns C and D as
instructed. (C1 or D1 should be the activeCell) Then When you go to
format=Conditional formatting, change the first dropdown from Cell Value

is
to Formula is, then enter Bob's first formula. Set the formatting, then

add
a formula and repeat

Order has no affect on whether the value of a cell matches a test value.

--
Regards,
Tom Ogilvy

"Paul Black" wrote in message
...
Thanks Tom & Bob for the Replies.

I have Tried Both Suggestions But Unfortunately they do Not give me the
Correct Results.
The Formulas I am Using in Conditional Format for Column D are :-

Cell Value is Equal to =Min($D$4:$D$305)
Cell Value is Equal to =Max($D$4:$D$305)

The Values in Column C are NOT Sequential so I think that this might be
Part of the Problem.

Thanks in Advance.
All the Best.
Paul



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Help with Conditional Formatting Please

Thanks Toppers, Tom and Bob,

What I Forgot to Include was the Fact that the Values Started in Cell C4
and Finished in Cell D305.

I Used the Formula :-

Formula is =$D4=MIN($D$4:$D$305)
and
Formula is =$D4=MAX($D$4:$D$305)

Both Work Great Thanks.

All the Best.
Paul






*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 01:19 PM.

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"