Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone help me please?
I am fairly new to writing code and am using a Do Loop combined with an If to find out if there is an empty string or a formula in a cell and if there is to clear the cell completely until the cell it reaches has nothing in it. However, at first whilst looping through the second condition was ignored (formula) and now I get an error message saying I have a Do without a Loop!!!???? I'm going bananas. The code I have written looks like below. If anyone can help I would be eternally grateful. Many thanks. Do Until ActiveCell.Value < Empty If ActiveCell.HasFormula = True Then ActiveCell.Clear ActiveCell.Offset(0, 1).Select ElseIf ActiveCell.Value = " " Then ActiveCell.Clear ActiveCell.Offset(0, 1).Select Else ActiveCell.Offset(0, 1).Select Loop |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
do while loop problem | Excel Discussion (Misc queries) | |||
VBA Loop Problem | Excel Programming | |||
Loop Problem | Excel Programming | |||
For..Next loop problem | Excel Programming | |||
loop problem | Excel Programming |