Highlighting Highest value in a row

Rick M

New Member
Joined
Feb 21, 2002
Messages
44
I have a pricing sheet that I have vendor pricing in. How can I highlight the lowest cost in a row?
a1=15.12
b1=12.43
c1=13.50

I want to highlight (in some way)text color or cell background color cell b1
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
On 2002-02-22 13:11, Rick M wrote:
I have a pricing sheet that I have vendor pricing in. How can I highlight the lowest cost in a row?
a1=15.12
b1=12.43
c1=13.50

I want to highlight (in some way)text color or cell background color cell b1
Thanks

Select your data (A1:C1 in your example), then go to Format-Conditional Formatting. Under Condition 1, change Cell Value is to Formula is, and type in the following formula (taking note of the absolute references - dollar signs):

=A1=MIN($A$1:$C$1)

Then click the Format button, and go to the Patterns tab and format as you like.

Hope this helps,

Russell
 
Upvote 0
This may do you
Sub LowRange()
Dim LastRow As Integer
Dim FLoop As Integer
Dim LowAddress As String

LastRow = Range(worksheets("sheet1").UsedRange.Address).Rows.Count
LowAddress = "$B$1"

For FLoop = 1 To LastRow
If Range("B" & FLoop).Value < Range(LowAddress).Value And Range("B" & FLoop).Value <> "" Then
LowAddress = Range("B" & FLoop).Address
End If
Next FLoop
Range(LowAddress).Interior.ColorIndex = 3
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,504
Messages
6,114,016
Members
448,543
Latest member
MartinLarkin

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