PC Review


Reply
Thread Tools Rate Thread

How can I delete every other row ?

 
 
Just Me
Guest
Posts: n/a
 
      25th Feb 2007
I like to keep a worksheet for my credit cards and when I copy them and
paste into a worksheet every other row is blank ( is has a light gray fill )
I would like to delete every other row. Can this be done ??


 
Reply With Quote
 
 
 
 
MartinW
Guest
Posts: n/a
 
      25th Feb 2007
Hi,

One Way
In a blank column put 1 in the first cell and 2 in the second cell.
Highlight both cells, grab the fill handle and drag down to the
end of your data, hold down ctrl before letting go of the left
button. This will give you repeating series of 1 and 2 running
down the sheet. Then go to Data>Filter>Autofilter and
select all the 2's or 1's whichever coincides with your blank rows
Then select the entire rows by their row number right click
and select delete entire rows then turn off autofilter.

HTH
Martin


 
Reply With Quote
 
Just Me
Guest
Posts: n/a
 
      25th Feb 2007
Thanks, I tried but found out that the rows I want to delete must be merged
together because there is no columns in those rows.

any suggestions??
"MartinW" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> One Way
> In a blank column put 1 in the first cell and 2 in the second cell.
> Highlight both cells, grab the fill handle and drag down to the
> end of your data, hold down ctrl before letting go of the left
> button. This will give you repeating series of 1 and 2 running
> down the sheet. Then go to Data>Filter>Autofilter and
> select all the 2's or 1's whichever coincides with your blank rows
> Then select the entire rows by their row number right click
> and select delete entire rows then turn off autofilter.
>
> HTH
> Martin
>



 
Reply With Quote
 
MartinW
Guest
Posts: n/a
 
      25th Feb 2007
Hi

You can't have rows without columns.
Make a copy of your workbook. Then select your data and
goto Format>Cells>Alignment Tab and uncheck merge cells.
Now what does your data look like? You may need to go into
more detail as it is all sounding a little bit confusing at the moment.

HTH
Martin


 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      25th Feb 2007
If doing it regularly, a macro tied to a button seems simplest

Sub ProcessData()
Const TEST_COLOUR As Long = 15 '<=== gray, change to suit
Dim iLastRow As Long
Dim i As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = iLastRow + 1 To 1 Step -1
If .Cells(i, "A").Value = "" And _
.Cells(i, "A").Interior.ColorIndex = TEST_COLOUR Then
.Rows(i).Delete
End If
Next i
End With
End Sub


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Just Me" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I like to keep a worksheet for my credit cards and when I copy them and
>paste into a worksheet every other row is blank ( is has a light gray
>fill ) I would like to delete every other row. Can this be done ??
>



 
Reply With Quote
 
Barbara Wiseman
Guest
Posts: n/a
 
      25th Feb 2007
You could try the
J-Walk Conditional Row Delete
available on this site
http://www.j-walk.com/ss/excel/files/general.htm
I use it a lot for a copy from an internal data base which arrives in excel
with 2 blank lines between each line of data.
You just choose a column in which the lines not required have a blank cell
and activate the add in. When installed it will appear under tools.
Barbara

"Just Me" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I like to keep a worksheet for my credit cards and when I copy them and
>paste into a worksheet every other row is blank ( is has a light gray
>fill ) I would like to delete every other row. Can this be done ??
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete data in a linked Excel sheet using Access code or seql delete Rocky Microsoft Access External Data 9 26th Jun 2005 12:42 AM
Re: Macro to delete sheets and saves remaining file does not properly delete module gazornenplat Microsoft Excel Programming 0 22nd Jun 2005 01:12 AM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Microsoft Excel Programming 7 21st Jun 2005 05:16 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette Microsoft Excel Programming 2 21st Sep 2004 02:40 PM
Re: When I highlight a sentence to delete, Word won't let me. I have to backspace. How can I deleted selected text with my delete key? Bill Foley Microsoft Word Document Management 1 4th Feb 2004 11:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:48 PM.