DYNAMIC RANGES

  • Thread starter Thread starter paul.sternhagen
  • Start date Start date
P

paul.sternhagen

I am looking to develop a macro that will allow me to select a range
of cells dynamically. I have created a mapping template that maps user
defined fields to native fields, but each file that I map has a
different number of rows of data. Rather than simply selecting a range
of cells statically, I am hoping that there is a macro out there that
will allow me to catch all data in a column by dynamically assigning my
range to include all rows of data up to the last row containing
information and no more. To add to this issue, not all intermediate
rows will contain data, but it is important that I capture all data in
the spreadsheet in my range. Any assistance will be most appreciated.
 
try using this
lastrow=cells(rows.count,"a").end(xlup).row
range("a2:d"&lastrow).dosomething
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top