macro to find out the last cell in a range

  • Thread starter Thread starter vikram
  • Start date Start date
V

vikram

i have a column which has a total in the end but the number of rows i
that column varies. I want a macro that gives me the total in a cell
specify in the same worksheet

please help!
thank
 
Turn on the macro recorder (Tools | Macro > Record new macro...), select
the first cell in the column, then do a SHIFT+CTRL+{down arrow}, and
finally turn off the macro recorder. Switch to the VBE and XL will give
you the necessary code.

You can improve on the XL generated code by using the tips in the
Excel/VBA/Beyond Excel's recorder page of my web site.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Business solutions leveraging technology
Microsoft Most Valuable Professional (MVP) 2000-2004
 

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