Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I know there is a way to find the last used row in a spreadsheet, but I'd like to know if there is any way to determine the last row used in a range in a spreadsheet in a closed workbook. -- peterv ------------------------------------------------------------------------ peterv's Profile: http://www.excelforum.com/member.php...o&userid=25572 View this thread: http://www.excelforum.com/showthread...hreadid=393787 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Depends on what the data looks like, but if there will be no blanks inside a
column of data =countA(C:\myfolder\[Myfiler.xls]Sheet1!$A:$A) would be something to try. Put this formula in a cell, then check the returned value and remove the formula. -- Regards, Tom Ogilvy "peterv" wrote in message ... I know there is a way to find the last used row in a spreadsheet, but I'd like to know if there is any way to determine the last row used in a range in a spreadsheet in a closed workbook. -- peterv ------------------------------------------------------------------------ peterv's Profile: http://www.excelforum.com/member.php...o&userid=25572 View this thread: http://www.excelforum.com/showthread...hreadid=393787 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Peter,
You have to open it to find out. You can do it invisibly for the user by using application.ScreenUpdating = false before opening. Regards Jean-Yves "peterv" wrote in message ... I know there is a way to find the last used row in a spreadsheet, but I'd like to know if there is any way to determine the last row used in a range in a spreadsheet in a closed workbook. -- peterv ------------------------------------------------------------------------ peterv's Profile: http://www.excelforum.com/member.php...o&userid=25572 View this thread: http://www.excelforum.com/showthread...hreadid=393787 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Tom, your suggestion works, if I'm doing it from within anothe worksheet. What I forgot to mention (the original post was around 3am is that I'm trying to do this in a VBA procedure. Do you, or doe anyone know how to execute a worksheet function from within vba? Thanks for your idea Tom. Jean-Yves, I haven't tried your idea yet, but I'm about to -- peter ----------------------------------------------------------------------- peterv's Profile: http://www.excelforum.com/member.php...fo&userid=2557 View this thread: http://www.excelforum.com/showthread.php?threadid=39378 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The easiest and fastest is to just do the same in a worksheet cell (just
using activecell as an example) Activecell.Formula = "=countA(C:\myfolder\[Myfiler.xls]Sheet1!$A:$A)" lastrow = ActiveCell.Value ActiveCell.clearcontents -- Regards, Tom Ogilvy "peterv" wrote in message ... Tom, your suggestion works, if I'm doing it from within another worksheet. What I forgot to mention (the original post was around 3am) is that I'm trying to do this in a VBA procedure. Do you, or does anyone know how to execute a worksheet function from within vba? Thanks for your idea Tom. Jean-Yves, I haven't tried your idea yet, but I'm about to. -- peterv ------------------------------------------------------------------------ peterv's Profile: http://www.excelforum.com/member.php...o&userid=25572 View this thread: http://www.excelforum.com/showthread...hreadid=393787 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving Sheet to Closed Workbook | Excel Discussion (Misc queries) | |||
Help...Code to copy sheet from closed workbook | Excel Discussion (Misc queries) | |||
Consolidation of data from cell in active sheet of closed workbook | Excel Worksheet Functions | |||
Import Sheet from Closed Workbook | Excel Programming | |||
Return Sheet Names from Closed Workbook | Excel Programming |