Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default MACRO for Deleting every 2nd ROW

hello,

I want make a Macro for deleting in selection data every second row, plz
help me.

Thanks/Tufail
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default MACRO for Deleting every 2nd ROW

Sub abc()
Dim frow As Long, lrow As Long
Dim i As Long
frow = Selection.Row
lrow = Selection.Rows(Selection.Rows.Count).Row
For i = lrow To frow Step -2
Selection.Rows(i).Delete Shift:=xlShiftUp
Next

End Sub

--
Regards,
Tom Ogilvy



"Tufail" wrote in message
...
hello,

I want make a Macro for deleting in selection data every second row, plz
help me.

Thanks/Tufail



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
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
Deleting Row Macro Steve M Excel Worksheet Functions 4 April 20th 06 03:42 PM
Macro is deleting everything! vmagal1 Excel Discussion (Misc queries) 3 April 25th 05 06:05 PM
VBA deleting Macro Pete Excel Programming 1 September 21st 04 08:07 PM
Deleting macro Stephane[_3_] Excel Programming 3 May 4th 04 06:12 PM


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