#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro's

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

--
Message posted via http://www.officekb.com
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Macro's

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

"Richard Swart via OfficeKB.com" wrote:

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

--
Message posted via http://www.officekb.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Macro's

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.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Richard Swart via OfficeKB.com" wrote in message
...
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

--
Message posted via http://www.officekb.com



Reply
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
Macro's T.F. Excel Discussion (Misc queries) 1 April 9th 10 10:16 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
Macro's CraigM Excel Worksheet Functions 2 January 17th 06 01:06 PM
Macro's Ron Excel Discussion (Misc queries) 1 December 27th 05 03:41 PM
macro's ELVIS ARON PRESLEY Excel Worksheet Functions 1 November 10th 04 06:42 PM


All times are GMT +1. The time now is 05:56 PM.

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"