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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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