I am trying to write code that does the following:
- Finds Cell A4.
- If cell contains a date, delete the entire row.
- I want this to loop until the cell in column A does not contain a date. Once the cell is blank, the loop can end.
Here's all you need to do this:
- Using the VBA function
IsDate
- If the value returned is true on the value in
Range A4
- Delete
entire row
ofRange A4
- If not then your sub is over.
Really it should not be much longer than 5-9 lines of code and it's all very very very simple. Come back if you have trouble writing the code and ask a specific question about what you are having trouble with.
AutoFilter
, inserting a working column formula or using variant arrays are all vastly superior to looping over a range. If you are open to other methods let us know – brettdj