Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text & Colour Hi-lite of "blank" cell
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................ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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................ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hi-Lite "empty" unlocked cells in non-hidden rows | Excel Programming | |||
If A3=alpha numeric,"X", if A3=text,"Y", Blank | Excel Worksheet Functions | |||
If A3=alpha numeric,"X", if A3=text,"Y", Blank | Excel Programming | |||
=IF(D13="PAID","YES","NO") Can I change fonts colour | Excel Discussion (Misc queries) | |||
Find "." (Full Stop) in cell then all text after colour blue | Excel Programming |