Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Hi-Lite "empty" unlocked cells in non-hidden rows

Trying to make a check for users to indicate which cells still require input,
when they think they are done.
Rows not required at this point will be hidden already.
The rows to be checked are then obviously NOT hidden.
The cells that require input are unlocked (alway yellow) and "empty"
I'd like these cells to be somehow "changed" ie: pattern - assuming that the
following, which is part of my printing code, will not remove the pattern.
Cells. Select
Selection.Interior.ColorIndex = -4142.
Then, the code should step thru all the "empty" (blank?) cells, starting in
C6, ending at bottom right (E?), allowing them the possibility of entering
data in each of the empty cells (hopefully). The entry of data in a cell
should automatically remove the pattern.
I hope this is understandable.
Input greatly appreciated, as always.

Sub MissingInfo()

Dim ws As Worksheet
Set ws = Worksheets("Pricing")
Dim LLastRow As Long
Dim c As Range

' Determine last row, using column B

LLastRow = ws.Range("B:B").SpecialCells(xlCellTypeLastCell).R ow
With ws.Range("C6:E" & LLastRow)

' Put a pattern in the unlocked empty cells in columns C6, thru E ?.
' (Could be, in 1 row, Columns C, and/or D, and/or E or any combination
thereof)
' Then, starting at C6, go to first empty, unlocked cell and stop.
' User can input data ( or not ). When Enter selected, steps to next empty,
unlocked cell. etc..............
' Input of data will remove pattern from cell.
' Step thru should be from Top, and alway Left to Right, in each
applicable row


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Hi-Lite "empty" unlocked cells in non-hidden rows

Excel doesn't work that way. It won't pause to allow the user to enter data.
You can prompt with an inputbox.

--
Regards,
Tom Ogilvy


"BEEJAY" wrote:

Trying to make a check for users to indicate which cells still require input,
when they think they are done.
Rows not required at this point will be hidden already.
The rows to be checked are then obviously NOT hidden.
The cells that require input are unlocked (alway yellow) and "empty"
I'd like these cells to be somehow "changed" ie: pattern - assuming that the
following, which is part of my printing code, will not remove the pattern.
Cells. Select
Selection.Interior.ColorIndex = -4142.
Then, the code should step thru all the "empty" (blank?) cells, starting in
C6, ending at bottom right (E?), allowing them the possibility of entering
data in each of the empty cells (hopefully). The entry of data in a cell
should automatically remove the pattern.
I hope this is understandable.
Input greatly appreciated, as always.

Sub MissingInfo()

Dim ws As Worksheet
Set ws = Worksheets("Pricing")
Dim LLastRow As Long
Dim c As Range

' Determine last row, using column B

LLastRow = ws.Range("B:B").SpecialCells(xlCellTypeLastCell).R ow
With ws.Range("C6:E" & LLastRow)

' Put a pattern in the unlocked empty cells in columns C6, thru E ?.
' (Could be, in 1 row, Columns C, and/or D, and/or E or any combination
thereof)
' Then, starting at C6, go to first empty, unlocked cell and stop.
' User can input data ( or not ). When Enter selected, steps to next empty,
unlocked cell. etc..............
' Input of data will remove pattern from cell.
' Step thru should be from Top, and alway Left to Right, in each
applicable row


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Hi-Lite "empty" unlocked cells in non-hidden rows

Tom, Thank-you
If you can help resolve my reply on my other post, I can likely use a
modification of it to accomplish a least part of what I was looking for here.
It is likely even better, because it will make the salesmen think and do
more, so hopefully, they will fill things out completely the first time round.

Thanks again.
JFS

"Tom Ogilvy" wrote:

Excel doesn't work that way. It won't pause to allow the user to enter data.
You can prompt with an inputbox.

--
Regards,
Tom Ogilvy


"BEEJAY" wrote:

Trying to make a check for users to indicate which cells still require input,
when they think they are done.
Rows not required at this point will be hidden already.
The rows to be checked are then obviously NOT hidden.
The cells that require input are unlocked (alway yellow) and "empty"
I'd like these cells to be somehow "changed" ie: pattern - assuming that the
following, which is part of my printing code, will not remove the pattern.
Cells. Select
Selection.Interior.ColorIndex = -4142.
Then, the code should step thru all the "empty" (blank?) cells, starting in
C6, ending at bottom right (E?), allowing them the possibility of entering
data in each of the empty cells (hopefully). The entry of data in a cell
should automatically remove the pattern.
I hope this is understandable.
Input greatly appreciated, as always.

Sub MissingInfo()

Dim ws As Worksheet
Set ws = Worksheets("Pricing")
Dim LLastRow As Long
Dim c As Range

' Determine last row, using column B

LLastRow = ws.Range("B:B").SpecialCells(xlCellTypeLastCell).R ow
With ws.Range("C6:E" & LLastRow)

' Put a pattern in the unlocked empty cells in columns C6, thru E ?.
' (Could be, in 1 row, Columns C, and/or D, and/or E or any combination
thereof)
' Then, starting at C6, go to first empty, unlocked cell and stop.
' User can input data ( or not ). When Enter selected, steps to next empty,
unlocked cell. etc..............
' Input of data will remove pattern from cell.
' Step thru should be from Top, and alway Left to Right, in each
applicable row


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Hi-Lite "empty" unlocked cells in non-hidden rows

You could try a non-macro solution and use conditional formatting. If
the cell value is ="" then have a color, and it will change when there
is text there (alternatively, you could have cell value is note equal
to ="" and then the formatting will also change when text is entered).
As Tom Ogilvy pointed out, the only way to enter data while a macro is
running is through an input box
The only way to do something similar to what you're asking would be to
put some macros in the workbook that capture the Workbook_SheetChange
event. The routine could change the format of the changed cell(s).
The SheetChange event will pass the changed range and and the
worksheets that were changed. Because users could skip cells and
leave them intentionally blank, you won't want to revert to the last
blank cell every time. You could have the macro select the next cell
after the last cell changed.
FYI, you should be careful about using the
specialcells(xlcelltypelastcell) - I'm pretty sure that it doesn't
always return the last cell in a workbook (If cells have been deleted
or changed since the last save).
I realize that my suggestion has been rather vague, but I think you
could try and use the change events to move the focus. If you do
decide to take this route and have any questions, please let me know.
I hope this helps.

On Mar 13, 1:44 pm, BEEJAY wrote:
Trying to make a check for users to indicate which cells still require input,
when they think they are done.
Rows not required at this point will be hidden already.
The rows to be checked are then obviously NOT hidden.
The cells that require input are unlocked (alway yellow) and "empty"
I'd like these cells to be somehow "changed" ie: pattern - assuming that the
following, which is part of my printing code, will not remove the pattern.
Cells. Select
Selection.Interior.ColorIndex = -4142.
Then, the code should step thru all the "empty" (blank?) cells, starting in
C6, ending at bottom right (E?), allowing them the possibility of entering
data in each of the empty cells (hopefully). The entry of data in a cell
should automatically remove the pattern.
I hope this is understandable.
Input greatly appreciated, as always.

Sub MissingInfo()

Dim ws As Worksheet
Set ws = Worksheets("Pricing")
Dim LLastRow As Long
Dim c As Range

' Determine last row, using column B

LLastRow = ws.Range("B:B").SpecialCells(xlCellTypeLastCell).R ow
With ws.Range("C6:E" & LLastRow)

' Put a pattern in the unlocked empty cells in columns C6, thru E ?.
' (Could be, in 1 row, Columns C, and/or D, and/or E or any combination
thereof)
' Then, starting at C6, go to first empty, unlocked cell and stop.
' User can input data ( or not ). When Enter selected, steps to next empty,
unlocked cell. etc..............
' Input of data will remove pattern from cell.
' Step thru should be from Top, and alway Left to Right, in each
applicable row



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Hi-Lite "empty" unlocked cells in non-hidden rows

Meatshield:
Thanks for your input.
It looks like have another way to tackle this, that I like even better than
what I was first trying to do.
Thanks again.


"meatshield" wrote:

You could try a non-macro solution and use conditional formatting. If
the cell value is ="" then have a color, and it will change when there
is text there (alternatively, you could have cell value is note equal
to ="" and then the formatting will also change when text is entered).
As Tom Ogilvy pointed out, the only way to enter data while a macro is
running is through an input box
The only way to do something similar to what you're asking would be to
put some macros in the workbook that capture the Workbook_SheetChange
event. The routine could change the format of the changed cell(s).
The SheetChange event will pass the changed range and and the
worksheets that were changed. Because users could skip cells and
leave them intentionally blank, you won't want to revert to the last
blank cell every time. You could have the macro select the next cell
after the last cell changed.
FYI, you should be careful about using the
specialcells(xlcelltypelastcell) - I'm pretty sure that it doesn't
always return the last cell in a workbook (If cells have been deleted
or changed since the last save).
I realize that my suggestion has been rather vague, but I think you
could try and use the change events to move the focus. If you do
decide to take this route and have any questions, please let me know.
I hope this helps.

On Mar 13, 1:44 pm, BEEJAY wrote:
Trying to make a check for users to indicate which cells still require input,
when they think they are done.
Rows not required at this point will be hidden already.
The rows to be checked are then obviously NOT hidden.
The cells that require input are unlocked (alway yellow) and "empty"
I'd like these cells to be somehow "changed" ie: pattern - assuming that the
following, which is part of my printing code, will not remove the pattern.
Cells. Select
Selection.Interior.ColorIndex = -4142.
Then, the code should step thru all the "empty" (blank?) cells, starting in
C6, ending at bottom right (E?), allowing them the possibility of entering
data in each of the empty cells (hopefully). The entry of data in a cell
should automatically remove the pattern.
I hope this is understandable.
Input greatly appreciated, as always.

Sub MissingInfo()

Dim ws As Worksheet
Set ws = Worksheets("Pricing")
Dim LLastRow As Long
Dim c As Range

' Determine last row, using column B

LLastRow = ws.Range("B:B").SpecialCells(xlCellTypeLastCell).R ow
With ws.Range("C6:E" & LLastRow)

' Put a pattern in the unlocked empty cells in columns C6, thru E ?.
' (Could be, in 1 row, Columns C, and/or D, and/or E or any combination
thereof)
' Then, starting at C6, go to first empty, unlocked cell and stop.
' User can input data ( or not ). When Enter selected, steps to next empty,
unlocked cell. etc..............
' Input of data will remove pattern from cell.
' Step thru should be from Top, and alway Left to Right, in each
applicable row




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
Empty cells showing that they are default formated to "Date" FredC Excel Discussion (Misc queries) 1 December 1st 09 10:36 PM
Cannot find "Plot empty cells as" option in 2007 Jack Tripper Charts and Charting in Excel 6 November 26th 08 12:38 PM
The rows have been moved to smallest possible and are "hidden" Jennifer Excel Discussion (Misc queries) 1 April 24th 08 05:39 PM
syntax for "IF" commend to check for multiple empty cells bf comma Chris Excel Worksheet Functions 4 September 3rd 07 12:02 PM
"ignoring" hidden cells in a copy/paste operation gvm Excel Discussion (Misc queries) 2 March 22nd 07 10:38 PM


All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"