Re: Excel last cell
Re: Excel last cell
- Subject: Re: Excel last cell
- From: Deivy Petrescu <email@hidden>
- Date: Thu, 14 Dec 2000 16:47:58 -0500
Pete Willis wrote
I am having problems getting the last cell of a large imported text
file in Excel (by large I mean roughly 1000 rows by 18 columns so
not massive). I found this script below by Carol Ellis dated Mon,
12 Apr 1999 on the archives which works fine on my text files as
long as they are below 300 rows. With anything larger i get an error
saying "unable to get length of 0". I presume that the line "set
theSelection to FormulaR1C1 of theRange" is unable to process the
large amount of data and just returns "0". Is there any other way
to get the number of used rows as I can't seem to find one and I'm
getting quite frustrated now. The Text file is a log report from a
Splash RIP that I am trying to filter out data into a new excel
sheet. Also what exactly is the definition of the FormulaR1C1
property as I can't find any documentation on the Excel dictionary.
To use the last cell:
set theLineIAmLookingFor to Row of (LastCell of Range "c1" Direction
xlDown) -- this finds the last row on the first column C1
set theRange to "R1C1:R" & theLineIAmLookingFor & "C4" -- once you
find the line, you have to use a variable to define the range and then
Select Range theRange -- you can use range.
Hope this helps.
Deivy Petrescu
http://www.dicas.com
Tips for your Mac.
Dicas para o seu Mac.
mailto:email@hidden
mailto:email@hidden