Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Excel selecting a range of undefined length

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  [Q] Mail not retrieving messages  
Author Message
Marty

External


Since: Dec 01, 2008
Posts: 3



(Msg. 1) Posted: Mon Dec 01, 2008 6:00 am
Post subject: Excel selecting a range of undefined length
Archived from groups: alt>comp>lang>applescript (more info?)

I am kind of new to applescript and trying to convert a macro from
excel in applescript due to the lack of VBA support in Office 2008 Mac
edition.

To select a range using VBA I used to perform the following:

Ex:
Range("a3").Select
itemcount = Cells(Cells.Rows.Count,1).End(xlUp).Row
Range("e3:e" & itemcount).Select

Is this possible in applescript as the whole macro is dependent on the
itemcount variable.

Martin

 >> Stay informed about: Excel selecting a range of undefined length 
Back to top
Login to vote
Marty

External


Since: Dec 01, 2008
Posts: 3



(Msg. 2) Posted: Wed Dec 03, 2008 12:30 am
Post subject: Re: Excel selecting a range of undefined length [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I managed to figure out a solution using the following command:

set lastRowNum to first row index of (get end (cell 1 of row (count
rows)) direction toward the top)

then in all my references i used Range("A2"A"& lastRowNum) ... as
normal in VBA.

just incase anyone is interested.

 >> Stay informed about: Excel selecting a range of undefined length 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Excel 2004 select range - Has anybody had any luck with Applescript and the latest version of Microsoft Excel? In Excel X, one could select columns 6 through 10 with the command: <font color=purple> ; select range "C6:C10"</font> But in the newe...

Assign Excel range from a list - The following Applescript inserts 4 2 64 in A1:A3. tell application "Microsoft Excel" set b to active workbook set s to sheet "Sheet1" of b set list1 to {{4}, {2}, {64}} set rng1 to range "A1:A3" of s end tell I have...

QuarkXpress 4.11 Selecting text - Hi, Can anybody tell me how to select a word within a story in a Quarkxpress text box. I only know how to select boxes. I am trying to work around a wierd problem where duplicating a paragraph from one text box into another text box results in the last...

Quark: how to make a new text style range ? - Hi, it is no problelm to read out a text style range. But how to create a new one ? I tried the following code: tell text box 1 make new text style range at end with properties{...} end tell I always get an error message ... What´s wrong with the cod...

how to control MS Excel - I'd like to tell Excel to open a tab-delimited file and create a chart based on its data. I'm using Excel for Mac X. I see that it has an extensive dictionary but I have no idea how most of the terms can actually be used. I used to use AppleWorks for....
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]