Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting rows based criteria
Hi Everyone: I am new to VBA and need help. I have tried modifying some
other VBA script without success. I need VBA script to find the Rows in Column A:A which contain "*Total*" ( EXample *0087 TOTAL) then select columns A:AQ for that row and formats the cell - Interior light Gray, Dark blue Font and bold. -- Johnny |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting rows based criteria
Sub Macro1()
' ' Macro1 Macro ' Macro recorded 7/18/2008 by Joel ' ' LastRow = Range("A" & Rows.Count).End(xlUp).Row Set CompareRange = Range("A1:A" & LastRow) For Each cell In CompareRange If InStr(cell.Value, "TOTAL") 0 Then With cell.EntireRow .Font.Bold = True With .Interior .ColorIndex = 15 .Pattern = xlSolid End With .Font.ColorIndex = 11 End With End If Next cell End Sub "Johnny" wrote: Hi Everyone: I am new to VBA and need help. I have tried modifying some other VBA script without success. I need VBA script to find the Rows in Column A:A which contain "*Total*" ( EXample *0087 TOTAL) then select columns A:AQ for that row and formats the cell - Interior light Gray, Dark blue Font and bold. -- Johnny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting based on 2 criteria | Excel Worksheet Functions | |||
Conditional Formatting based on multiple criteria | Excel Programming | |||
Selecting rows based on criteria | Excel Discussion (Misc queries) | |||
Delete rows based on certain criteria | Excel Discussion (Misc queries) | |||
Copying whole rows based upon one criteria | Excel Discussion (Misc queries) |