I am trying to create a macro that copies the values of one cell and pastes it into another cell. Each time the macro is run the number of records might be different. How can I find the row number of the last record, so my macro doesn't copy empty cells over?
Range("A65536".End(xlUp).Select
or
Range("A1", Range("A1".End(xlDown)).Select
or
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Bit of shameless self promotion here but there is a FAQ on this (well, 2 actually) in the VBA formum FAQs
faq707-2115
and
faq707-2112
These 2 combined, have at least 4 different ways of acurately finding the last used cell....and I know there's a load of others, including Mike's and Indu's
HTH
~Geoff~
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.