Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2008

Tip: Looking for answers? Try searching our database.

still having trouble

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Theo - 25 Jan 2008 18:44 GMT
I am trying to insert additional logic here ******

Sub HiLite()
For Each cll In Range("A:A")
If cll.Value = "C" Or cll.Value = "c" Then

If IsEmpty(cll.Offset(0, 1)) Then cll.Offset(0, 1).Interior.ColorIndex = 6 _
Else: cll.Offset(0, 1).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 2)) Then cll.Offset(0, 2).Interior.ColorIndex = 6 _
Else: cll.Offset(0, 2).Interior.ColorIndex = xlNone

***** If cells R - U are ALL empty, then high-light. R - U; if ONE of them
is NOT empty then NONE of the cells are high-lighted *********
End If
Next
End Sub

Thanks for any help!!
Mike H - 25 Jan 2008 20:02 GMT
Theo,

Maybe this

Sub HiLite()
For Each cll In Range("A1:A10")
If cll.Value = "C" Or cll.Value = "c" Then
   If IsEmpty(cll.Offset(0, 1)) Then
       cll.Offset(0, 1).Interior.ColorIndex = 6
   Else:
       cll.Offset(0, 1).Interior.ColorIndex = xlNone
   End If

   If IsEmpty(cll.Offset(0, 2)) Then
       cll.Offset(0, 2).Interior.ColorIndex = 6
   Else:
       cll.Offset(0, 2).Interior.ColorIndex = xlNone
   End If
   
   Set myrange = Range(cll.Offset(0, 17), cll.Offset(0, 20))
       For Each c In myrange
           If Not IsEmpty(c) Then
           myrange.Interior.ColorIndex = xlNone
           GoTo 100
           End If
       Next
       myrange.Interior.ColorIndex = 6
100:
End If
Next
End Sub

Mike

> I am trying to insert additional logic here ******
>
[quoted text clipped - 14 lines]
>
> Thanks for any help!!
Theo - 25 Jan 2008 21:32 GMT
Extremely fabulous!!
Thank you
T

> Theo,
>
[quoted text clipped - 48 lines]
> >
> > Thanks for any help!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.