Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Delete every other row.

I have a spreadsheet where we have collected data for the entire year.
Every other row needs to be cleared out. I need a way to be able to
clear the data from these cells automatically. Can anyone come up with
a macro for this.

This is what I have This is what I
want
1
1
2
3
3
4
5
5
6
7
7
8
9
9

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Wright
 
Posts: n/a
Default Delete every other row.

Delete the row or Clear the row? Very different results

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

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



"ChuckF" wrote in message
oups.com...
I have a spreadsheet where we have collected data for the entire year.
Every other row needs to be cleared out. I need a way to be able to
clear the data from these cells automatically. Can anyone come up with
a macro for this.

This is what I have This is what I
want
1
1
2
3
3
4
5
5
6
7
7
8
9
9



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Delete every other row.

Clear the cell. Not the entire row. Sorry that my example didn't show
the way I wanted it to. My real life examples are also not numbers.
It's just that I need to clear every other cell in a downward direction.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Delete every other row.

Whoops...it actually is the entire row. I want to keep row 1 but clear
the data from row 2, keep 3 clear the data from 4...so on and so on.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Wright
 
Posts: n/a
Default Delete every other row.

OK, I'm assuming you really mean Clear the data and not Delete the row.

Assuming your data is in say A1:G1000, in cell H2 put the following formula
and copy down:-

=MOD(ROW(),2)

In cell H1 put a title eg FilterMe

Select H1:H1000 and do data / filter / autofilter and filter on whatever
number (0 or 1) appears against the rows you wish to clear.

Now select all your data and do Edit / Go To / Special / Visible cells only,
then hit delete. Now unfilter.

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

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


"ChuckF" wrote in message
oups.com...
Whoops...it actually is the entire row. I want to keep row 1 but clear
the data from row 2, keep 3 clear the data from 4...so on and so on.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Delete every other row.

I thought it was easier than I was making it. Thanks for your help!

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
in workbook, where is delete worksheet Teressa Excel Worksheet Functions 5 January 19th 06 11:46 PM
how do I delete a worksheet from my workbook DLee New Users to Excel 2 August 15th 05 09:59 PM
In a protected worksheet allow users to delete rows Jason Trivett Excel Worksheet Functions 1 July 12th 05 09:50 AM
Delete row depending on criteria adw223 Excel Discussion (Misc queries) 1 June 30th 05 12:55 AM
How to delete blank rows John Mansfield Excel Discussion (Misc queries) 3 April 27th 05 11:48 PM


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