Need to delete rows relative to selection
Nigel, Leith and Bob,
Thank you all very much for your help. All three solutions work out well
for me. This will save me quite a bit of time.
Regards,
Suzanne
"ratchick" wrote:
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
|