View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Text & Colour Hi-lite of "blank" cell

A little crude but it works,

Sub citrus()
Dim lr As Long
lr = ActiveSheet.Cells(Rows.Count, 2).End(xlUp).Row
Set rng = ActiveSheet.Range("B2:B" & lr)
For Each c In rng
If c = "*" And Range("D" & c.Row) = "" And _
Range("D" & c.Row).Locked = False Then
c.Offset(0, 2).Interior.ColorIndex = 45
Range("D" & c.Row) = "REQ 'D"
End If
If c = "*" And Range("E" & c.Row) = "" And _
Range("E" & c.Row).Locked = False Then
c.Offset(0, 3).Interior.ColorIndex = 45
Range("E" & c.Row) = "REQ'D"
End If
Next
End Sub



"BEEJAY" wrote in message
...
Looking to insert Text and colour (45 orange) cell, when blank, under the
following conditions. This must be done in VBA.

If B? = "*" AND D? = unlocked and D? is " " (blank), then
colour D? Orange and insert "REQ'D"
ALSO:
If B? = "*" AND E? = unlocked and E? is " " (blank), then
colour E? Orange and insert "REQ'D"
I presume these two lines could be "joined" somehow, in the code.
As I picture it, this will be step # 1.

By way of explanation , Step # 2 will be to count all the cells that have
"REQ'D" in it, and display the total in a message.
"You have ____ (QTY) of items that require data input.
Do you wish to continue?"
"If NO, please go back and review missing data.
"If YES, Outstanding data rows will be copied to sheet "Outstanding"

Thanks in advance................