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: 5,441
Default Conditional Formatting a range of cells

Gregory,

Perhaps something like this, which will color cells in A1:B10 less than 8000
or greater than 9000 Red.

Dim myCell As Range

For Each myCell In Range("A1:B10")
If myCell.Value 9000 Or myCell.Value < 8000 Then
myCell.Interior.ColorIndex = 3
End If
Next myCell

HTH,
Bernie
MS Excel MVP

"Gregory" wrote in message
...
I am trying to change the background color of cells where the value is <

or a certain number. Is there a simple way to do this programatically?
Thanks in advance for any help


 
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 on Range of Cells RoadKill Excel Worksheet Functions 7 March 30th 10 02:23 AM
Conditional Formatting to a RANGE of cells Wojo Excel Discussion (Misc queries) 2 October 1st 09 03:09 PM
Conditional formatting a range of cells. DBane Excel Discussion (Misc queries) 4 July 30th 07 03:30 PM
Conditional formatting a range of cells Givvie Excel Worksheet Functions 3 January 19th 07 03:49 PM
Conditional formatting for range of cells? Compass Rose Excel Worksheet Functions 5 November 24th 06 07:07 PM


All times are GMT +1. The time now is 06:46 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"