Ignoring zeros in macro

PedroMojica

New Member
Joined
Jul 19, 2011
Messages
9
having trouble typing code to ignore the zeros in the spreadsheet, just trying to bold the lowest number without it being zero. Here is the code I have right now, cant seem to find the right combination to not count the zeros in each column.

Sub BoldMinimum()
Selection.FormatConditions.Delete
Selection.FormatConditions.Add _
Type:=xlExpression, Formula1:= _
"=" & ActiveCell.Address(0, 0) & _
"=Min(" & Selection.Address & ")"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
End Sub
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
This macro works perfectly for me on Excel 2003.

Are the numbers in cells C28:G32 actually numbers or could they be numbers-as-text?

Can you post the data you have in C28:G32?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,711
Members
452,939
Latest member
WCrawford

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