LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default VBA help- Do While and If statements

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!
 
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
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements Merge Excel Worksheet Functions 8 April 5th 06 01:04 AM
IF and MAX statements bob Excel Worksheet Functions 5 April 2nd 06 04:33 AM
if statements, and statements Sum Limit and marking Excel Worksheet Functions 3 March 29th 06 03:25 PM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM


All times are GMT +1. The time now is 09:58 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"