View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ozgrid.com ozgrid.com is offline
external usenet poster
 
Posts: 464
Default how do I copy the last 20 entries in an expanding list

Assumes list is Column "A" and is contiguous

Sub CopyLastX()
Dim rRange As Range

Set rRange = Range(Cells(Rows.Count, 1).End _
(xlUp).Offset(-20, 0), Cells(Rows.Count, 1).End(xlUp))

MsgBox rRange.Address
End Sub


--
Regards
Dave Hawley
www.ozgrid.com
"DJA" wrote in message
...
Within a macro, I need to copy the last 20 entries of a list to another
location.
as the list grows, I still only need the last 20 entries to copy to the
location.
in lotus I would write "end down" "up 20" then copy & move.

I can't find a corresponding formula in excel.

when I try using end down in the macro and copy... it seems to always use
the original space rather than the new space as new entries are listed.