Macro's

  • Thread starter Thread starter Richard Swart via OfficeKB.com
  • Start date Start date
R

Richard Swart via OfficeKB.com

I would like to make a macro that enables me to delete specific rows. My
data always has the following properties:
date value
22-1-1970 9
23-1-1970 9
24-1-1970
25-1-1970
26-1-1970 9
27-1-1970 9,06
28-1-1970 9,06
29-1-1970 8,88
30-1-1970 9
31-1-1970
1-2-1970
2-2-1970 9,13
3-2-1970 9,19
4-2-1970 9,19

I now want to delete the cells that are empty (zero) and the corresponding
date cell to its left. so something in the range of: if cell b*=0 then del
b* and its corresponding date in column a. Doing this by hand makes no
sense since this is a data set of over 8000 cells
 
This might be a silly question but why not just sort by column B and float
all of the blanks to the top or bottom and then delete them?

HTH
 
OK, firstly Empty is not necessarily the same as Zero, so I'm going to
assume Empty really means Empty.

Select all of column B. Do Edit / Go To / special / blanks, then Edit /
Delete / Entire row.

You can also use Autofilter to filter on cells equal to 0 or empty or
whichever it is and then use Goto / special / visible cells only, then
Edit / Delete / Entire row.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top