G
Guest
I'm a bit of a VBA novice, but I know this should be relatively simple.
Example:
A B C D
Bread Butter 15.00 17.00
Bread Cheese 14.00 11.00
Bread Meat ten 13.00
Bread Pickle x y
Bread Sandwich 11.00
I want Excel to delete all rows if there is text or nothing in cell C or
cell D. I want to keep all rows where there is a number in cell C or cell D
of that row. Thus, the first two rows would stay while the last three would
be deleted. I presume I would use the IsNumber function for part of this.
So I'm thinking of using a Do...While loop, but I can't figure out how to
incorporate the "If" statement to look at EITHER cell C OR cell D, or how to
assign the number of rows that the loop will require. Any guidance on this
please? Many thanks!
Example:
A B C D
Bread Butter 15.00 17.00
Bread Cheese 14.00 11.00
Bread Meat ten 13.00
Bread Pickle x y
Bread Sandwich 11.00
I want Excel to delete all rows if there is text or nothing in cell C or
cell D. I want to keep all rows where there is a number in cell C or cell D
of that row. Thus, the first two rows would stay while the last three would
be deleted. I presume I would use the IsNumber function for part of this.
So I'm thinking of using a Do...While loop, but I can't figure out how to
incorporate the "If" statement to look at EITHER cell C OR cell D, or how to
assign the number of rows that the loop will require. Any guidance on this
please? Many thanks!