Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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................



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
Hi-Lite "empty" unlocked cells in non-hidden rows BEEJAY Excel Programming 4 March 14th 07 11:44 AM
If A3=alpha numeric,"X", if A3=text,"Y", Blank Gary Excel Worksheet Functions 16 August 8th 06 08:27 PM
If A3=alpha numeric,"X", if A3=text,"Y", Blank Gary Excel Programming 2 August 7th 06 08:47 AM
=IF(D13="PAID","YES","NO") Can I change fonts colour Kev Excel Discussion (Misc queries) 3 February 17th 06 04:27 AM
Find "." (Full Stop) in cell then all text after colour blue David Mitchell Excel Programming 2 October 31st 03 04:21 PM


All times are GMT +1. The time now is 05:53 PM.

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"