Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
What is the function to end a Do While statemnet when encountering a null,
blank or empty cell? Thank you Dave |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
Dave,
Try If IsEmpty(ActiveCell) Then Exit Do End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Dave" wrote in message ... What is the function to end a Do While statemnet when encountering a null, blank or empty cell? Thank you Dave |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
Hi Dave,
Something like this... Do Until rngYourCell.Value = "" 'loop activity here Loop -- Regards, Zack Barresse, aka firefytr To email, remove NOSPAM "Dave" wrote in message ... What is the function to end a Do While statemnet when encountering a null, blank or empty cell? Thank you Dave |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
i = 1
do while not isempty(cells(i,1)) cells(i,1).interior.colorIndex = 3 i = i + 1 Loop i = 1 Do cells(i,1).Interior.ColorIndex = 3 i = i + 1 Loop until isempty(cells(i,1) -- Regards, Tom Ogilvy "Dave" wrote: What is the function to end a Do While statemnet when encountering a null, blank or empty cell? Thank you Dave |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
Should this do it? "Loop Until IsEmpty(ActiveCell.Cells)"
"Tom Ogilvy" wrote: i = 1 do while not isempty(cells(i,1)) cells(i,1).interior.colorIndex = 3 i = i + 1 Loop i = 1 Do cells(i,1).Interior.ColorIndex = 3 i = i + 1 Loop until isempty(cells(i,1) -- Regards, Tom Ogilvy "Dave" wrote: What is the function to end a Do While statemnet when encountering a null, blank or empty cell? Thank you Dave |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
Take out the ".Cells" portion and it should work.
-- Regards, Zack Barresse, aka firefytr To email, remove NOSPAM "Dave" wrote in message ... Should this do it? "Loop Until IsEmpty(ActiveCell.Cells)" "Tom Ogilvy" wrote: i = 1 do while not isempty(cells(i,1)) cells(i,1).interior.colorIndex = 3 i = i + 1 Loop i = 1 Do cells(i,1).Interior.ColorIndex = 3 i = i + 1 Loop until isempty(cells(i,1) -- Regards, Tom Ogilvy "Dave" wrote: What is the function to end a Do While statemnet when encountering a null, blank or empty cell? Thank you Dave |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stop Do While at Null
You can use that, but in this case it superfluous. Better to do as Zack
advises as demonstrated from the immediate window: ? isempty(activecell.Cells) True ? isempty(activecell) True Eventually you will mature in your coding want to stop selecting cells, which slows your code way down and makes the screen flash. When you do, use the methods I originally suggested. -- Regards, Tom Ogilvy "Dave" wrote in message ... Should this do it? "Loop Until IsEmpty(ActiveCell.Cells)" "Tom Ogilvy" wrote: i = 1 do while not isempty(cells(i,1)) cells(i,1).interior.colorIndex = 3 i = i + 1 Loop i = 1 Do cells(i,1).Interior.ColorIndex = 3 i = i + 1 Loop until isempty(cells(i,1) -- Regards, Tom Ogilvy "Dave" wrote: What is the function to end a Do While statemnet when encountering a null, blank or empty cell? Thank you Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Failed to save table attributes of (null) into (null). | Excel Discussion (Misc queries) | |||
How do I stop chart from plotting null values as zeros in excel 20 | Charts and Charting in Excel | |||
COUNTIF says Null = Blank but Blank < Null | Excel Worksheet Functions | |||
How do you stop excel from charting empty cells/null values as zer | Charts and Charting in Excel | |||
cell value based on null/not null in another cell | Excel Worksheet Functions |