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 Changing cell colour in Range


Hi all!

I got some help with this bit of code, but i wanted to modify it a
little. I haven't had any luck. I was hoping to check the values of a
couple of cells rather than just "G14:S14" (eg: G13:S13...G17:S17) This
bit of code works, however i'm not sure how to get it to read each of
the rows. The conditions are the same for each row. Any help would be
greatly appreciated!! Thanks


Private Sub Worksheet_Change(ByVal Target As Range)
Dim bOk as Boolean, cell as Range
Dim icolor As Integer
If Not Intersect(Target, Range("G14:S14")) Is Nothing Then
bOk = True

for each cell in Range("G14:S14")
if not isdate(cell.Value) then
if cell.Text < "N/A" then
bOK = False
exit for
end if
end if
Next
If bOk then
Range("F14").Interior.ColorIndex = 4
Else
Range("F14").Interior.ColorIndex = 0
End If
End if

End Sub


--
viewmaster
------------------------------------------------------------------------
viewmaster's Profile: http://www.excelforum.com/member.php...o&userid=32094
View this thread: http://www.excelforum.com/showthread...hreadid=519227

 
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
Changing the colour of a range of cells, some with formulas. Champ Excel Worksheet Functions 8 February 3rd 09 09:21 AM
Changing background colour when changing data in a cell Paoul Excel Discussion (Misc queries) 7 December 26th 08 07:25 AM
Changing fill colour of cells in a range Paul Hyett[_2_] Excel Discussion (Misc queries) 8 July 14th 07 07:04 PM
Changing a cell colour fatdave Excel Discussion (Misc queries) 2 November 9th 06 08:44 AM
Changing Cell Colour Audrey Ng Excel Programming 3 December 16th 03 02:58 PM


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