ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to find out the last cell in a range (https://www.excelbanter.com/excel-programming/296768-macro-find-out-last-cell-range.html)

vikram

macro to find out the last cell in a range
 
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

--
Message posted from http://www.ExcelForum.com


Tushar Mehta

macro to find out the last cell in a range
 
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/




All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com