Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This will work on a dynamic column A.
Sub Bold() Dim lr As Long lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row For Each c In Range("A2:A" & lr) If c.Value = Int(c.Value) Then c.Font.ColorIndex = 3 End If Next End Sub "Mike" wrote in message ... I'm an amateur excel user and I've just taught myself how to create a macro. I have a bid program that I export a summary sheet to excel. I've set up a macro to format column widths and column colors. I want to add to this macro to search column A for WHOLE numbers. If the cell in column A is a whole number, then I want to change that row to bold. Help please? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I do this enough, I'll get it right. You wanted the entire row to be
bold. (and not red) Sub Bold() Dim lr As Long lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row For Each c In Range("A2:A" & lr) If c.Value = Int(c.Value) Then c.EntireRow.Font.Bold = True End If Next End Sub "JLGWhiz" wrote in message ... This will work on a dynamic column A. Sub Bold() Dim lr As Long lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row For Each c In Range("A2:A" & lr) If c.Value = Int(c.Value) Then c.Font.ColorIndex = 3 End If Next End Sub "Mike" wrote in message ... I'm an amateur excel user and I've just taught myself how to create a macro. I have a bid program that I export a summary sheet to excel. I've set up a macro to format column widths and column colors. I want to add to this macro to search column A for WHOLE numbers. If the cell in column A is a whole number, then I want to change that row to bold. Help please? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search column...change row to BOLD | Excel Programming | |||
Search column...change row to BOLD | Excel Programming | |||
Search and change font color to Red and bold it | Excel Programming | |||
Search for Change in a column. | Excel Programming | |||
Using [bold] as a criterion to search | Excel Discussion (Misc queries) |