Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default still having trouble

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!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default still having trouble

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

"Theo" wrote:

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!!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default still having trouble

Extremely fabulous!!
Thank you
T

"Mike H" wrote:

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

"Theo" wrote:

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!!

Reply
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
Trouble with IF EG Excel Worksheet Functions 9 October 3rd 06 07:15 PM
Still having trouble scott Excel Discussion (Misc queries) 3 May 17th 06 08:01 PM
Im in trouble!!! Please Help!! JS JimmyS Excel Discussion (Misc queries) 1 June 19th 05 10:21 PM
still having trouble with this.... nick Excel Worksheet Functions 4 March 13th 05 07:40 PM
Trouble getting used to VBA JF[_4_] Excel Programming 2 June 22nd 04 09:22 PM


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