Thread
:
Copying to a flexible range
View Single Post
#
2
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Copying to a flexible range
lastrow=cells(rows.count,"a").end(xlup).row
range("b12").copy range("a"&lastrow)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"johncpa" wrote in message
...
I want to copy a formula using a macro but the ending part of the range can
change. For example, the user inputs the current age and a retirement age
and the retirement age can change. How do I create a macro that can allow
the range to be flexible, i.e. 15 years, 20 years, etc. I can copy the
formula manually to the ending range but I want to be able to have a macro
perform this automatically. Any help would be appreciated.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett