Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry if first suggestion along wrong lines.
not tested but does doing this solve text / numeric problem? =COUNTA('C:\Path\[File.xls]Sheet1'!A:A) -- jb "Geoff K" wrote: Hi John I do not want to ever open source wbooks if I can possibly avoid it. They are used once only to extract data and are not used again unless there are anomalies in the final analysis. Opening and closing wbooks wastes time if you only need their data and there are so many of them. Somehow I have to get the real last row BEFORE I begin to extract data because I need to establish the original record count. I use ADO for extraction and it works fine. But when I use a SELECT COUNT (*) to get a record count it gets messed up sometimes because a wbook may have been saved with an out of line UsedRange. One wbook I came across showed the last UsedRange call as AF50918 instead of S98. That produced an original record count of 50917 instead of 97. I've been through a number of alternatives then came across the method which I posted. But it doesn't work consistently. It seems ok if the first field in a closed wbook is numeric - and it reurns N/A if it encounters a text field - but if the first field is a text field then it throws a wobbler. If I can get the thing to work correctly I can install formulae on the hidden wsheet of my Add-in and loop through all the wbooks in the folder and calculate the number of original records in each. Geoff "john" wrote: Geoff, Use a helper cell in the closed workbook and add formula like this: =COUNTA(A:A) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get values from 15 sheets in a Wbook | Excel Programming | |||
updating wbook from other... | Excel Programming | |||
transfering data from 2 wbook | Excel Programming | |||
transfering data value from 2 Wbook... | Excel Programming | |||
Read And Write On A Closed Wbook | Excel Programming |