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
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
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.
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?
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: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.
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??
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)
Awesome! Thanks!
Okay, now to add a kicker...
For Purchase Orders...
How do I alter that to only include POs that I've received?
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks