+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Save subtraction formula or record macro

  1. #1
    Registered User
    Join Date
    07-07-2010
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    Save subtraction formula or record macro

    I download bank statement info in csv format and import it into Excel 2010. Column D has the total amount of the transaction and Column E the GST amount. Then I have 10 or so columns to the left to show which expense category it is eg Tools, Phone etc. How can I record a formula or macro to be able to select the cell under 'Tools' or whatever and calculate column D amount less column E amount for that row?
    Last edited by wanted-66; 07-08-2010 at 06:50 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,327

    Re: Save subtraction formula or record macro

    Hi wanted-66
    Welcome to the forum
    maybe in cell H2 =(D1-E1)
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    07-07-2010
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    Re: Save subtraction formula or record macro

    Thanks Pike for your time and the welcome.
    Yes I know how to enter a formula, but it gets quite time consuming doing it row after row.
    I would love to be able to select the cell where I want the answer (anywhere from Column G to Y) and be able to use a macro shortcut such as Control + g, that runs: D(same row number)-E (same row number). The answer would be in the same row as the D & E cells being used for the formula.
    I have tried recording a macro, but it doesn't work as it seems to use how many cells to the left etc and obviously while the D & E columns remain the same, the cell I need the answer in varies.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,327

    Re: Save subtraction formula or record macro

    possibly..
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-07-2010
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    Re: Save subtraction formula or record macro

    Thanks so much for your help.
    It worked perfectly, the first time I ran it, but then would not run again, gave answer of 0 or some enormous number.
    Macro has title of GSTcalc and this is how I used your code

    Please Login or Register  to view this content.
    I have attached a copy of the top of the work sheet in case that may help
    Many thanks
    Attached Files Attached Files
    Last edited by wanted-66; 07-07-2010 at 08:45 AM. Reason: add code tags

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,327

    Re: Save subtraction formula or record macro

    Dude

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    add some code tags to your snipet of code

  7. #7
    Registered User
    Join Date
    07-07-2010
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    Re: Save subtraction formula or record macro

    Sorry.
    Have fixed it

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,327

    Re: Save subtraction formula or record macro

    Hey I'll back just had to change from wireless to adsl
    The fast (Faster) Internet has arrived

    Try...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-07-2010
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    Re: Save subtraction formula or record macro

    Yippee!
    It works beautifully.
    Thanks very much, saves hours of work.
    Your help is much appreciated.

  10. #10
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,327

    Re: Save subtraction formula or record macro

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1