PC Review


Reply
Thread Tools Rate Thread

Deleting alternative rows

 
 
=?Utf-8?B?Q3VydCBK?=
Guest
Posts: n/a
 
      23rd Aug 2007
I have region containing roughly 100 rows. I would like to create a macro
that deletes every other row within the region. I would like to start by
deleting row 2 & then continue to do so for the rest of the region.

Please advise.

Thanks
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      23rd Aug 2007
try this
Sub deleteeveryotherrow()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -2
Rows(i).Delete
Next i
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Curt J" <Curt (E-Mail Removed)> wrote in message
news:73002C76-B288-4E9A-8884-(E-Mail Removed)...
>I have region containing roughly 100 rows. I would like to create a macro
> that deletes every other row within the region. I would like to start by
> deleting row 2 & then continue to do so for the rest of the region.
>
> Please advise.
>
> Thanks


 
Reply With Quote
 
=?Utf-8?B?Q3VydCBK?=
Guest
Posts: n/a
 
      24th Aug 2007
Perfect, thanks for the help Don.

"Curt J" wrote:

> I have region containing roughly 100 rows. I would like to create a macro
> that deletes every other row within the region. I would like to start by
> deleting row 2 & then continue to do so for the rest of the region.
>
> Please advise.
>
> Thanks

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      24th Aug 2007
Glad to help

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Curt J" <(E-Mail Removed)> wrote in message
news:A824E147-AEF6-46BB-9091-(E-Mail Removed)...
> Perfect, thanks for the help Don.
>
> "Curt J" wrote:
>
>> I have region containing roughly 100 rows. I would like to create a
>> macro
>> that deletes every other row within the region. I would like to start by
>> deleting row 2 & then continue to do so for the rest of the region.
>>
>> Please advise.
>>
>> Thanks


 
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
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:02 AM
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:01 AM
Coloring Alternative Rows only if data is there BetaDocuments Microsoft Excel New Users 4 6th Jan 2009 08:12 AM
Button alternative to deleting subform records =?Utf-8?B?Umlja1c=?= Microsoft Access Form Coding 2 1st May 2007 02:55 PM
Excel 2000 VBA Deleting Rows when certain text in rows exists scain2004 Microsoft Excel New Users 1 15th Mar 2004 02:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:55 PM.