LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default VBA Conditional formating

I'm trying to create a conditional format on about 150 rows in my
spreadsheet

Range("A4:L4").Select
Range("A5:L5").Select
Range("A6:L6").Select

Up to

Range("A150:L150").Select

Using these three condition

Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$M$4=""xxxxx"""
Selection.FormatConditions(1).Interior.ColorIndex = 4
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$I$4=""yyyyy"""
Selection.FormatConditions(2).Interior.ColorIndex = 38
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$I$4=""zzzzzzzz"""
Selection.FormatConditions(3).Interior.ColorIndex = 40

(In the condition I would use the variable count to go to next row)

I tried creating a loop with a counter but I can't get my variable to
worth in the ranges.

Any help would be greatly appreciated.

 
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 Formating Vicky Excel Discussion (Misc queries) 2 August 15th 07 02:12 PM
Conditional formating a row bgl Excel Worksheet Functions 1 August 10th 06 04:09 PM
Conditional Formating Zee Excel Discussion (Misc queries) 5 August 10th 06 02:56 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Conditional Formating Roy Excel Discussion (Misc queries) 4 May 27th 05 01:16 AM


All times are GMT +1. The time now is 03:06 AM.

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

About Us

"It's about Microsoft Excel"