View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Embarrassing Excel Macro Function

use a named range perhaps?

name F15 say "MyData". when you insert rows, the name will follow the cell.

Sub Macro2()

Range("A1").Value = Range("Mydata").Value

End Sub

HTH
Patrick Molloy
Microsoft Excel MVP


"Serge" wrote:

I wish I knew more about macros, I know someone will help me, please don't
laugh at me though :).

Here's my thing. I have supplied the small macro I have, IF i inserted 10
new rows in my worksheet the macro won't work anymore because it is looking
for the data in cell F15 and it isn't there anymoe because I have inserted
new lines, how do I telkl the macro to go to cell F25. Secondly I always need
the info in the original F15 cell, however I will not alwas add 10 rows,
maybe sometimes it will be 8, therefore I need the macro to go to the new
cell anfter I have inserted the rows.

Thanks in advance, since it is the 1st time I post here, I hope I wasn't too
long and was clear

Oh yes I use Office 2003.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 28/12/2004 by Serge
'

'
Range("F15").Select
Selection.Copy
Range("A1").Select
ActiveSheet.Paste
End Sub



--
Dell 8200.
nVidia Ti 4200. 64mgs
RAM 512mgs.
P4, 2.26 Ghz.
OS, XP Home.