Delete rows

John Davis

Well-known Member
Joined
Sep 11, 2007
Messages
3,457
Hello All:

I have a spreadsheet, I want to highlight a section and delete every other row. Can someone advise the best way to accomplish this. All help is appreciated.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Re: Delete alternate rows

Here's my non-fancy way of doing it:

- Insert a new column (so that you have a new Column A which is blank)
- in the first four cells of Column A, enter 0, 1, 0, 1
- then expand this series of 0s and 1s to span your entire spreadsheet so that you have a series of alternating 0s and 1s in column A
- Sort your spreadsheet by column A
- then delete all your rows that have 0s or 1s (whichever contains the data you do not want).
- then resort the range by column A again so that your remain data sorts to the top of the sheet (in case your data was in the rows that contained 0s).

I'm sure there is a way to program a macro or VBA code to do this, but that's my layman's method.

Good luck!
 
Upvote 0
Re: Delete alternate rows

Here's my non-fancy way of doing it:

- Insert a new column (so that you have a new Column A which is blank)
- in the first four cells of Column A, enter 0, 1, 0, 1
- then expand this series of 0s and 1s to span your entire spreadsheet so that you have a series of alternating 0s and 1s in column A
- Sort your spreadsheet by column A
- then delete all your rows that have 0s or 1s (whichever contains the data you do not want).
- then resort the range by column A again so that your remain data sorts to the top of the sheet (in case your data was in the rows that contained 0s).

I'm sure there is a way to program a macro or VBA code to do this, but that's my layman's method.

Good luck!

Thanks Charles. That's exactly what I was looking for, an approach, which wouldn't take much time. However, unfortunately, I decided to write the code too delete. Oh well, I'll try and remember this one the next time.
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top