View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
z.entropic z.entropic is offline
external usenet poster
 
Posts: 16
Default defining a variable-size worksheet area for copying & pasting

The worksheets I work with have a variable number of columns and rows, thus
when I record a macro and use a Ctrl-Shift-End to highlight an area to copy,
it may/will not work if re-used with a different set of data. This is
because the macro records an absolute address of the lowest rightmost cell,
not the Ctrl-Shift-End operation. Of course, I could always oversize the
area being copied to the largest possible size, but the solution would not
be elegant and probably waste storage space...

What expression/formula should this lowest right address be replaced with in
a modified macro to include only the rectangular area with filled cells?
What if the upper left cell's address is other than A1?

z.entropic