![]() |
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 |
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 |
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. |
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. |
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. |
Delete every other row.
I thought it was easier than I was making it. Thanks for your help!
|
Delete every other row.
You're very welcome :-)
Regards Ken................. "ChuckF" wrote in message ups.com... I thought it was easier than I was making it. Thanks for your help! |
All times are GMT +1. The time now is 06:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com