• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: R1C1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R1C1


  • Subject: Re: R1C1
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 14 Jul 2009 08:49:00 -0700
  • Thread-topic: R1C1

Title: Re: R1C1
And of course you can use any row number as before.

--
Paul Berkowitz



From: Paul Berkowitz <email@hidden>
Date: Tue, 14 Jul 2009 08:06:52 -0700
To: AppleScript-Users <email@hidden>
Subject: Re: R1C1

Take advantage of the 'get address' command:

set myVariableNumberOfCells to 12
tell application "Microsoft Excel"
   set endAddress to get address (cell myVariableNumberOfCells of row 1) without row absolute and column absolute
   range ("A1:" & endAddress)
end tell
--> range "A1:L1"


If you don't mind seeing the "$L$1" absolute terminology (it's just going to be the same range anyway) save yourself some typing:

set myVariableNumberOfCells to 12
tell application "Microsoft Excel"
   set endAddress to get address (cell myVariableNumberOfCells of row 1)
   range ("A1:" & endAddress)
end tell
--> range "A1:$L$1"


(If you really want to ensure absolute cells, use "$A$1" yourself.)


--
Paul Berkowitz


> From: Frank Renner <email@hidden>
> Date: Tue, 14 Jul 2009 12:12:30 +0200
> To: AppleScript-Users <email@hidden>
> Subject: R1C1
>
> Hi,
>
> I have been carefully reading the Excel AppleScript Reference and many  
> of the threads of this list, but still can't sort this out in my head.
>
> If I have to select or fill a variable number of cells. This would be  
> easy in R1C1 notation as all I would have to do is build a range like
>
> "R1C1:R1C" & (myVariableNumberOfCells as string)
>
> As this (the "R1C1" notation) doesn't seem to work any more...how is  
> it achieved in the A1 notation? Do I really have to "translate" like  
> "1 is A", "2 is B" and so on or is there an easier way?
>
> Frank Renner
>  _______________________________________________
> 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


_______________________________________________
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
 _______________________________________________
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

References: 
 >Re: R1C1 (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: R1C1
  • Next by Date: Mail: Message Reference Problem
  • Previous by thread: Re: R1C1
  • Next by thread: Simple apple script - Beginner Problem
  • Index(es):
    • Date
    • Thread