LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Need to delete rows relative to selection

Hi all,

I'm sure that this is quite simple, but I haven't done much coding for quite
some time and need a quick fix. The following is my base code:

'
Rows("914:1127").Select
Selection.Delete Shift:=xlUp
Rows("914:914").Select
Selection.Insert Shift:=xlDown
End Sub

Now, obviously this macro will only affect rows 914 - 1127. What I need to
happen is for the macro to delete the next 213 rows, including the one row
that I will select. I will then require a new row inserted into the selected
row. Basically I just need to know how to make a "relative" reference in the
code based on the row I will physically select.

Thanks in advance for any help provided.

Suzanne
 
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
Relative Range Selection & Paste Have_Data_Will_Travel Excel Discussion (Misc queries) 2 September 28th 09 11:58 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
XL2K - Conditional Formatting relative to cell selection Lezh Excel Discussion (Misc queries) 3 December 31st 05 09:56 AM
Copy selection based on relative reference goofy11 Excel Programming 3 September 19th 05 05:57 PM
textbox selection to relative row? CAA Excel Programming 1 December 4th 03 01:21 AM


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