![]() |
Search column...change row to BOLD
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? |
Search column...change row to BOLD
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? |
All times are GMT +1. The time now is 01:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com