Editing a macro
You need to determine the last used row and you can do this with this
lastrow = Range("A65536").End(xlUp).Row
Set myrange = Range("K4", lastrow)
This checks Column A so edit to suit.
Mike
Mike
"Dtmos01" wrote:
Looking for information on how to edit a macro. Using a macro to enter data
into a spreadsheet. The number of entries is never the same. How do you
tell Excel to stop entering data after the last entry? I currently have to
enter a value such as Range("K4:K20000"), but I never have 20000 entries, it
will fill the remaining cells with #VALUE, I need the macro to stop after the
last entry. Any ideas?
|