ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help With Macro (https://www.excelbanter.com/excel-programming/394729-help-macro.html)

wile coyote

Help With Macro
 
i want to have a macro that will copy a selection of rows and insert them in
a variable location in my spreadsheet..... ex: say i am at row 100 and want
to copy data from rows from sheet 2 say rows 25 - 150 and them insert them
at row 100 (this time, may be row 200 next time). i can get my macro to go
find the data copy it and return to row 100 every time. what i am having
trouble with is how to make it retrun to where it started from ... be it row
100 or 200 or 250 or where ever.

any help you can offer is greatly appreciated

tia

wc



Zone[_3_]

Help With Macro
 
Why not just use a variable to hold the starting row so you can come back
there?
StartRow=activecell.row
Maybe I don't understand the problem.
James
"wile coyote" wrote in message
...
i want to have a macro that will copy a selection of rows and insert them
in a variable location in my spreadsheet..... ex: say i am at row 100 and
want to copy data from rows from sheet 2 say rows 25 - 150 and them insert
them at row 100 (this time, may be row 200 next time). i can get my macro
to go find the data copy it and return to row 100 every time. what i am
having trouble with is how to make it retrun to where it started from ...
be it row 100 or 200 or 250 or where ever.

any help you can offer is greatly appreciated

tia

wc




nowhereman[_3_]

Help With Macro
 
I am a obviously a newbie to macro, vba and customizing

thank you very much for your "easy fix"

my macro now works perfectly

i appreciate you taking time to pass on your knowledge even to us
annoying newbies

best wishes

wc


"Zone" wrote in
:

Why not just use a variable to hold the starting row so you can come
back there?
StartRow=activecell.row
Maybe I don't understand the problem.
James
"wile coyote" wrote in message
...
i want to have a macro that will copy a selection of rows and insert
them in a variable location in my spreadsheet..... ex: say i am at row
100 and want to copy data from rows from sheet 2 say rows 25 - 150 and
them insert them at row 100 (this time, may be row 200 next time). i
can get my macro to go find the data copy it and return to row 100
every time. what i am having trouble with is how to make it retrun to
where it started from ... be it row 100 or 200 or 250 or where ever.

any help you can offer is greatly appreciated

tia

wc






Zone[_3_]

Help With Macro
 
Glad to help. We all start as newbies! James
"nowhereman" wrote in message
. 96.26...
I am a obviously a newbie to macro, vba and customizing

thank you very much for your "easy fix"

my macro now works perfectly

i appreciate you taking time to pass on your knowledge even to us
annoying newbies

best wishes

wc


"Zone" wrote in
:

Why not just use a variable to hold the starting row so you can come
back there?
StartRow=activecell.row
Maybe I don't understand the problem.
James
"wile coyote" wrote in message
...
i want to have a macro that will copy a selection of rows and insert
them in a variable location in my spreadsheet..... ex: say i am at row
100 and want to copy data from rows from sheet 2 say rows 25 - 150 and
them insert them at row 100 (this time, may be row 200 next time). i
can get my macro to go find the data copy it and return to row 100
every time. what i am having trouble with is how to make it retrun to
where it started from ... be it row 100 or 200 or 250 or where ever.

any help you can offer is greatly appreciated

tia

wc









All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com