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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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,528
Messages
6,114,154
Members
448,553
Latest member
slaytonpa

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