LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Help with a Macro

Sub MyMacro()
Application.ScreenUpdating = False

Range(ActiveCell.Offset(6, 0), ActiveCell.Offset(1, 0)).EntireRow.Delete
Range(ActiveCell.Offset(-3, 0), ActiveCell.Offset(-1, 0)).EntireRow.Delete
ActiveCell.Offset(10, 0).Select

Application.ScreenUpdating = True
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"hpoincare" wrote:

Office Excel 2007 - latest updates.

I want to place my cursor in a cell $D, run my macro and have it:

Delete 3 rows (entirely) above my selected cell (row)
Delete 6 rows (entirely) below my selected cell (row)

and then move my cursor to 10 rows beneath my original selected cell $D

I need for this to work irrespective of the actual row locations. I want
the macro to reference only the current location of my cursor in my D column.

Thanks


 
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 11:13 PM.

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"