+ Reply to Thread
Results 1 to 5 of 5

Macro to multiple two columns then sum?

  1. #1
    Registered User
    Join Date
    06-03-2009
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Macro to multiple two columns then sum?

    Hi everyone,

    Here's my problem. I have a work book with 97 sheets, all of the sheets are identical in format but contain different data. I need to multiple column F (which is a price) by column G (which is a quantity). I then need to sum the results and spit this number out on a new sheet. So in then end I would have 97 entries on the new sheet with this new sum which would give me are total stock value on hand.
    I've been trying to do this by recording Macros but have had no luck.

    Can anyone help with a macro?


    Thanks for any help.

    Nick
    Last edited by kuat00; 08-10-2009 at 01:27 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to multiple two columns then sum?

    What are the exact ranges in play in F&G - are the dimensions of this range identical on each of the 97 sheets? Do the ranges contain any blanks / non-numerics etc...? Is there a naming convention to the sheets ?
    You could possibly do this with native Functions... pending size of ranges it may not be worthwhile but we need more info...

  3. #3
    Registered User
    Join Date
    06-03-2009
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Macro to multiple two columns then sum?

    The ranges vary between sheets and change everytime the sheets are updated. The data contains only numerical values. In column G they are in dollars and in column F they just numbers.

    The sheets themselves are named as abbreviations of their locations. For example CG=Calgary and ED=Edmonton.

    Thanks for your help.

    I've attached a sample sheet to give you an idea.
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to multiple two columns then sum?

    Sorry, I'm in a bit of a rush but I think the below does what you want there or thereabouts...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-03-2009
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Macro to multiple two columns then sum?

    Works like a charm, thank you so much for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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