• 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: Excel Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excel Question


  • Subject: Re: Excel Question
  • From: Christian Boyce <email@hidden>
  • Date: Sat, 21 Jul 2012 14:15:04 -0700

This works for me:

tell application "Microsoft Excel"
set the_cell to selection
set x to first row index of the_cell
set formula of the_cell to "=D" & x & "-G" & x & "-H" & x
end tell


On Jul 21, 2012, at 9:29 AM, Bill Guion wrote:

I have an Excel spreadsheet that I use to keep track of medical expenses, insurance payments, my payments, etc. On some rows, in the ith column, I enter this formula: =D9-G9-H9 (if the entry happens to be in row 9). What I normally do is move the active cell to another row, copy the formula, move the active cell back, and paste the formula.

It would be nice to activate the desired cell and enter a key combination which would run an Applescript. The Applescript would determine which row is active and construct the formula (let x be the active row): =Dx-Gx-Hx, then paste the formula in the active cell.

Can someone point me in the right direction for this?

    -----===== Bill =====-----

 _______________________________________________
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

  • Follow-Ups:
    • Re: Excel Question
      • From: Bill Guion <email@hidden>
References: 
 >Excel Question (From: Bill Guion <email@hidden>)

  • Prev by Date: Re: Convert UI Element List to Strings?
  • Next by Date: Re: Excel Question
  • Previous by thread: Excel Question
  • Next by thread: Re: Excel Question
  • Index(es):
    • Date
    • Thread