Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting based on 2 criteria Still learning@work Excel Worksheet Functions 4 April 7th 09 10:16 PM
Conditional Formatting based on multiple criteria rasinc Excel Programming 2 March 9th 08 02:18 AM
Selecting rows based on criteria JCP Excel Discussion (Misc queries) 3 April 5th 06 09:26 AM
Delete rows based on certain criteria Coal Miner Excel Discussion (Misc queries) 2 March 3rd 06 05:56 PM
Copying whole rows based upon one criteria kirbster1973 Excel Discussion (Misc queries) 2 May 26th 05 10:00 PM


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"