How do I write an Excel macro when the cell range changes weekly?

  • Thread starter Thread starter AT
  • Start date Start date
A

AT

I need to write a macro but the range of data will change every time I access
the report. I don't know how to specify a range that isn't static.
 
last non empty cell in column A :
rw=sheets("Sheet1").cells(65536,1).end(xlup).row

or select from activecell to last cell :
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select

"AT" skrev:
 
Data is in multi-rows and columns or in one column or??

What you want is doable but need more info please.

Example...................

Set rng = Range(Range("B1"), Cells(Rows.Count, 2).End(xlUp))

rng will be from B1 down to the last cell in column B with data


Gord Dibben MS Excel MVP
 
Back
Top