+ Reply to Thread
Results 1 to 8 of 8

Auto Totaling

  1. #1
    Registered User
    Join Date
    04-09-2007
    Posts
    56

    Auto Totaling

    I have a column data on a worksheet, the PO number for specific purchases where a PO number may be listed multiple times. One a separate worksheet within the same workbook, I have a PO summary section where PO numbers are manually entered and the next column sums the the total value of each PO.

    Is there a way I could have the Summary section identify POs and automatically total them without having them manually entered?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Totaling

    To do it in a single cell:

    =SUMIF(Sheet1!A1:A1000,Sheet2!B3,Sheet1!C1:C1000)

    Where Sheet2!B3 had the PO number you were comparing to the column A on Sheet1, and Sheet1 column C has the values to sum.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-09-2007
    Posts
    56

    Re: Auto Totaling

    Im not sure that is working. Ive attached a file that might clarify my goal.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Totaling

    Yep, totally missed that in the question. Here's a couple of array formulas to do that for you. I can offer a non-array too, but that requires an additional "helper" column in your data. If your sheet isn't big enough to be affected by the arrays shown here, this is good to go.

    There is a different formula in A2 from the rest, so don't mix them up. This array system has the added benefit of ordering the list, too. even if it were alphabetic, it would alphabetize them.
    Attached Files Attached Files
    Last edited by JBeaucaire; 03-04-2009 at 04:43 PM.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Totaling

    Just for chuckles and giggles, here's the version that uses a helper column to index the first occurrence of each PO number making it simple to draw them into the main list with a simple INDEX/MATCH. Very fast.

    Press F9 to watch the whole thing resort, I randomized the entries in the I column to aid the demonstration.
    Attached Files Attached Files
    Last edited by JBeaucaire; 03-04-2009 at 04:59 PM.

  6. #6
    Registered User
    Join Date
    04-09-2007
    Posts
    56

    Re: Auto Totaling

    Quote Originally Posted by JBeaucaire View Post
    Yep, totally missed that in the question. Here's a couple of array formulas to do that for you. I can offer a non-array too, but that requires an additional "helper" column in your data. If your sheet isn't big enough to be affected by the arrays shown here, this is good to go.

    There is a different formula in A2 from the rest, so don't mix them up. This array system has the added benefit of ordering the list, too. even if it were alphabetic, it would alphabetize them.
    Good afternoon,

    I am using the smae formual noted in A2, but when I hit enter, the cell reads "N/A" - any idea what I am doing wrong?

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Totaling

    There are a lot of formulas on my sheet. No idea which formula you've moved, which you're referring to, what you changed (or forgot to) and why it's erroring out.

    If I saw the sheet and you pointed all this out, much easier to help.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Auto Totaling

    if po only goes up by 1 if newly added and you have as laid out only space for 35 diferent po's then perhaps attached
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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