![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi
I need the last used cell/row or a total count of all used cells in coumn A. When the sheet is empy, this line of code assigns the value of 17? There are currently 25 rows filled with values from A1:A25 Still assigns the value of 17? What's wrong with the code? Thanks in advance! Tom The search utility is not working on Mr Excel LastRowUpdate = Workbooks(FileToOpen).Sheets("sheet1").Range("a1:a" & Range("A65536").End(xlUp).Row).Rows.Count [ This Message was edited by: TsTom on 2002-03-27 03:47 ] [ This Message was edited by: tstom on 2002-03-27 03:54 ] |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Tom
Try With Workbooks(FileToOpen).Sheets("sheet1") LastRowUpdate = .Range("A1", .Range("A65536").End(xlUp)).Row End With Or better still With Workbooks(FileToOpen).Sheets("sheet1") LastRowUpdate = WorksheetFunction.CountA(.Columns(1)) End With |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|