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
In article , vikram
says...
i have a column which has a total in the end but the number of rows in
that column varies. I want a macro that gives me the total in a cell i
specify in the same worksheet
please help!
thanks
---
Message posted from http://www.ExcelForum.com/