ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hi-lite missing field with macro (https://www.excelbanter.com/excel-programming/404201-hi-lite-missing-field-macro.html)

theo

hi-lite missing field with macro
 
Hi I've seen some samples, but not exactly what I'm looking for

If data entered in column A:

= A, then check the corresponding row, columns B, M and R - if these are
blank highlight them in yellow
= D, then check the corresponding row, columns C, D and S - if these are
blank
highlight them in yellow

Any help is appreciated!!
T



Lazzzx

hi-lite missing field with macro
 
Hi Theo,

Made this code, which I think would solve your problem.

Sub ShowMissingInformation()
For Each cll In Range("A:A")
If cll.Value = "A" 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, 12)) Then cll.Offset(0, 12).Interior.ColorIndex
= 6 _
Else cll.Offset(0, 12).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 17)) Then cll.Offset(0, 17).Interior.ColorIndex
= 6 _
Else cll.Offset(0, 17).Interior.ColorIndex = xlNone
End If
If cll.Value = "D" Then
If IsEmpty(cll.Offset(0, 2)) Then cll.Offset(0, 2).Interior.ColorIndex =
6 _
Else cll.Offset(0, 2).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 3)) Then cll.Offset(0, 3).Interior.ColorIndex =
6 _
Else cll.Offset(0, 3).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 18)) Then cll.Offset(0, 18).Interior.ColorIndex
= 6 _
Else cll.Offset(0, 18).Interior.ColorIndex = xlNone
End If
Next

End Sub
regards,
Lazzzx

"Theo" skrev i meddelelsen
...
Hi I've seen some samples, but not exactly what I'm looking for

If data entered in column A:

= A, then check the corresponding row, columns B, M and R - if these are
blank highlight them in yellow
= D, then check the corresponding row, columns C, D and S - if these are
blank
highlight them in yellow

Any help is appreciated!!
T




theo

hi-lite missing field with macro
 
Thank you so much !
It was perfect.

T

"Lazzzx" wrote:

Hi Theo,

Made this code, which I think would solve your problem.

Sub ShowMissingInformation()
For Each cll In Range("A:A")
If cll.Value = "A" 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, 12)) Then cll.Offset(0, 12).Interior.ColorIndex
= 6 _
Else cll.Offset(0, 12).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 17)) Then cll.Offset(0, 17).Interior.ColorIndex
= 6 _
Else cll.Offset(0, 17).Interior.ColorIndex = xlNone
End If
If cll.Value = "D" Then
If IsEmpty(cll.Offset(0, 2)) Then cll.Offset(0, 2).Interior.ColorIndex =
6 _
Else cll.Offset(0, 2).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 3)) Then cll.Offset(0, 3).Interior.ColorIndex =
6 _
Else cll.Offset(0, 3).Interior.ColorIndex = xlNone
If IsEmpty(cll.Offset(0, 18)) Then cll.Offset(0, 18).Interior.ColorIndex
= 6 _
Else cll.Offset(0, 18).Interior.ColorIndex = xlNone
End If
Next

End Sub
regards,
Lazzzx

"Theo" skrev i meddelelsen
...
Hi I've seen some samples, but not exactly what I'm looking for

If data entered in column A:

= A, then check the corresponding row, columns B, M and R - if these are
blank highlight them in yellow
= D, then check the corresponding row, columns C, D and S - if these are
blank
highlight them in yellow

Any help is appreciated!!
T






All times are GMT +1. The time now is 04:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com