View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
SeanC UK[_3_] SeanC UK[_3_] is offline
external usenet poster
 
Posts: 48
Default Identify last row of record in a pipe-delimited text file

Hi Edmund,

I am assuming that the file is open in Excel? If so, this should work:

Dim lngLastRow As Long
lngLastRow = Cells(Rows.Count, 1).End(xlUp).Row

I hope this helps,

Sean.


--
(please remember to click yes if replies you receive are helpful to you)


"Edmund" wrote:

I hv a pipe-delimited text file containing millions of records. This file is
automaticaly updated with more new records daily.

Is there a faster way to instantly identify the last row of record instantly
without using a counter to count the # of records in advance?

I'm unable to use random access as I don't know the last row # of the
database. Using a counter to count the # of records in advance is time
consuming. Wondering if there's sharper & faster ways achieve this.

Thanks in advance.
--
Edmund
(Using Excel 2003)