Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter a cell value from a VBA macro
I have a macro which works out the last row in a column of data. I wan
to put the row number in a Cell. How can I do this ? Thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter a cell value from a VBA macro
Hi
Following macro puts the last row number of the Range starting in A1 in cell B1. regards Sub Macro11() Dim lLastRow As Long Dim rgLast As Range Set rgLast = Range("A1").SpecialCells(xlCellTypeLastCell) lLastRow = rgLast.Row Range("A1").Value = lLastRow End Sub -----Original Message----- I have a macro which works out the last row in a column of data. I want to put the row number in a Cell. How can I do this ? Thanks --- Message posted from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
enter a new value into a cell using macro in excel | Excel Discussion (Misc queries) | |||
Can you enter a formula in a cell to run a macro? | Excel Worksheet Functions | |||
enter data in cell then run macro automatically | Excel Discussion (Misc queries) | |||
Pause Macro to enter data in cell | Excel Programming | |||
Pause Macro to enter data in cell | Excel Programming |