End of column in Excel
End of column in Excel
- Subject: End of column in Excel
- From: Jay Young <email@hidden>
- Date: Mon, 28 Jan 2002 17:32:52 -0600
Hi,
I'm trying to select all the text from a column in Excel without
selecting the empty cells at the end, but can't figure it out. My plans
are to create a formula in column 2 next to the first cell in column 1
and then drag that formula down using autofill to the last line of text
in column 1. I've got most of this figured out (thanks to Excel's
recording capabilities) but getting the autofill to stop at the last
line of text of column 1 is what I can't figure out. This is what I've
come up with so far for finding the last cell in column 1:
tell app "MicroSoft Excel"
get LastCell (column 1) direction xlDown
end tell
This works unless you have an empty cell in the column somewhere between
the text. So for example if I had this in column 1:
Business Numbers
555-5555
(blank cell)
777-7777
888-8888
then the code would get 555-5555 and not 888-8888 from column 1. Is it
possible to do something like this? I'm thinking that if I can find the
last cell I can count the cells up to the last one and tell column 2 to
autofill that amount of cells. Thanks for your help.
Jay