Excel: finding last used cell in a range
Excel: finding last used cell in a range
- Subject: Excel: finding last used cell in a range
- From: Oakley Masten <email@hidden>
- Date: Mon, 2 Feb 2009 13:55:53 -0800 (PST)
Mon, 2 Feb 2009 Justin Laden wrote
Hey everyone,
I had a line in some of my scripts that I thought gave me the last
used row in a range--and I mean the last cell with data inside.
set endRow to first row index of last row of used range of active sheet
But I don't think it is working.
I tried Paul's code from the VBA transition guide, and I couldn't get
it to compile--any ideas?
Justin This works for me using Excel 2004
tell application "Microsoft Excel"
set cols to count of columns of used range of active sheet
set rws to count of rows of used range of active sheet
end tell
Oakley
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden