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: 1
Default Coloring a range depending on a cell value


Mine colors the row of the cell with a value more then 0:

Its not the best as I have used If not ... but it works


Sub ChangeRowColor()
Dim Cell As Range

For Each Cell In Range("Q1:Q20")
If IsEmpty(Cell) Then GoTo EmptyCell

If Not Cell <= 0 Then
Cell.EntireRow.Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If

Next Cell

EmptyCell:
MsgBox "All Suppliers with a positiv 'Grand Total' is now colored red"
End Su

--
Ctec
-----------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774
View this thread: http://www.excelforum.com/showthread.php?threadid=47330

 
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
updating cell range depending on input value handicapper Excel Worksheet Functions 3 April 17th 10 05:50 AM
Cell coloring when the value is an integer and within said range Bala Excel Worksheet Functions 3 June 2nd 08 09:41 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Conditional formatting depending a range of cell Marisa Excel Worksheet Functions 2 November 1st 05 01:31 AM
print a certain range depending what is in cell? Momo Excel Programming 1 February 24th 05 04:56 PM


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