Colouring cells in column by smallest value

teamsimpson

New Member
Joined
Sep 20, 2002
Messages
22
Does anyone have a piece of code that will
1)colour a cell in a column which has the smallest value (numerical), i need to apply this to columns c,d,e and f
2)colour a cell in a column which has the largest value (numerical),i need to apply this to columns g and h.
Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Assuming the data is in rows 1 to 5:

1. Select range C1:F5 and choose Format, Conditional Formatting. Formula Is:

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

choose your Format and click OK.

2. Select range G1:H5 and choose Format, Conditional Formatting. Formula Is:

=G1=MAX(G$1:G$5)

choose your Format and click OK.
 
Upvote 0
Well can't you record your actions following my suggestion then use that in your code? Or is there a reason you don't want to use conditional formatting?
 
Upvote 0
The conditional format works fine, how would the formula look if the min ar max values were times, ie. 2'54"76, or 51"28
This message was edited by teamsimpson on 2002-10-14 12:12
 
Upvote 0
no unfortunatley the worksheet if from another file, it is input into my file as an embedded object, the some column values are decimal numbers and other columns are times for example, 2'54"76 which is 2minutes and 54.76 seconds
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,037
Members
449,062
Latest member
mike575

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top