+ Reply to Thread
Results 1 to 9 of 9

SUM with VLOOKUP

  1. #1
    Registered User
    Join Date
    04-28-2017
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    7

    Question SUM with VLOOKUP

    Hey y'all,

    It's been a LONG time since I needed VLOOKUP and I've forgotten how to get excel to look up a value and add the total amounts from column "f" of that value in column "a"

    Help??

    TIA ~ Stephanie

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUM with VLOOKUP

    Hi and welcome to the forum.

    In short you can't. A Vlookup can only return one value. You need the SUMIF() function, or if you have more than one condition the SUMIFS()
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    04-28-2017
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    7

    Re: SUM with VLOOKUP

    So in short, I would need to create single fields with sums on that sheet and use VLOOKUP to reference that one field on a different sheet?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUM with VLOOKUP

    Hi,

    What's the object here. I understood you to have a table of values in columns A:F, and you have lets say a target value in H1 and want to know the sum of the values in F where the Values in A match H1. In which case the formula would be

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you have a list of values in H1:H10 just copy the H1 formula down.

    Better still use a Pivot Table which will summarise without you needing to use any formulae at all.

  5. #5
    Registered User
    Join Date
    04-28-2017
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    7

    Re: SUM with VLOOKUP

    Sorry, I guess I should have read your response better. I misunderstood because I was in a hurry and didn't fully read what you said.

    To explain a little better what my end goal is. I have a set of part numbers, I want to create a cell on sheet 4 in the workbook that will tell me the total number of a certain part number I've purchased from sheet 2 and another cell to tell me how many of those parts have been ordered by customers from sheet 3. (sorry, I can't take a screenshot, it's proprietary information).

    For example, for PN 123, I have 7 purchase orders (all on separate lines) and 10 customer orders (also all on separate lines). Column A has the PN on each sheet, while Column D on each sheet has the qty ordered. I need excel to look up the PN and add up the quantities I've ordered, and then do the same for my customers.

    Does this make sense??

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: SUM with VLOOKUP

    For PO

    =SUMIF(Sheet2!A:A,123,Sheet2!.D:D)

    For Customers

    =SUMIF(Sheet3!A:A,123,Sheet3!.D:D)

    Change ranges as required

    Better to have 123 as a cell e.g A2 in Sheet4

    =SUMIF(Sheet2!A:A,A2,Sheet2!.D:D)


    =SUMIF(Sheet3!A:A,123,Sheet3!.D:D)

  7. #7
    Registered User
    Join Date
    04-28-2017
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    7

    Re: SUM with VLOOKUP

    Awesome! Thanks!

    Okay, now to add a kicker...

    For Purchase Orders...
    How do I alter that to only include POs that I've received?

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: SUM with VLOOKUP

    You will need to use SUMIFS and add a condition which you haven't defined which indicates whether a PO has been received.

    NOTE: with SUMIFS, the values to be summed is the FIRST range whereas with SUMIF it is the last range.

    e..,

    =SUMIFS(D:D,Sheet2!A:A,123,Sheet2!B:B,"Y")

    So column B has Y indicating received: change to your criteria.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUM with VLOOKUP

    Quote Originally Posted by SparkBigDreams View Post
    Awesome! Thanks!

    Okay, now to add a kicker...

    For Purchase Orders...
    How do I alter that to only include POs that I've received?
    So now that you are extending the requirements it's really time to consider using a Pivot Table and give yourself a much greater degree of flexibility.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 12-07-2016, 09:18 AM
  2. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  3. Display Cell within VLookup range that excel thinks matches the VLookup Value
    By headachexcelperson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 04:56 PM
  4. [SOLVED] Vlookup is not working and giving =vlookup(B2,$T$2:$U$135,2,false) this kind of values.
    By yogeshsharma1981 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2013, 04:08 PM
  5. how to bring all vlookup returns even with duplicate vlookup search keys
    By NYC4LIFE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2013, 04:53 PM
  6. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  7. Replies: 5
    Last Post: 07-29-2009, 07:53 AM

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