VLOOKUP and SUMIFS

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
120
Office Version
  1. 365
Platform
  1. MacOS
I’m trying to add values in a column on a different table within the same workbook, if multiple criteria are met (that’s the sumifs part).

But I need to use a VLOOKUP to find those values to be added from one sheet to another.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I have two worksheets, one is 10 x infinite, here is our example to work with

ABCDEFGHIJ
1NameDollar AmountDescriptionPart NumberAddressStatesCountry(Irrelevant Information)(Irrelevant information)Quantity
2Bob$1000.00Apples10002000Route 57New YorkUnited StatesRedLincoln1
3Fred$3000.00Pears10002100Route 66CaliforniaMexicoBlueFord3
4George$2500.00Grapes10401010Route 166ArizonaAustraliaGrayToyota5
5Gerard$4500.00Apricots10398392Route 87WashingtonEnglandBlackHyundai2
6Brandi$6500.00Strawberries18393029Route 328North CarolinaChinaBrownChevy6
7Bob$5000.00Pears10002100Route 166ArizonaAustraliaGrayToyota5
CONTINUES for several rows down-->>>VVV

<tbody>
</tbody>

Note that some information such as price is a multiplier of the quantity, but the location information may change. Also note that the part number determines the description (as any barcode would)

I need to use a VLOOKUP that has a complete list of all part numbers in sequential order (3000+ numbers) with their corresponding descriptions and base price.

The SUMIFS and VLOOKUP needs to check how many of each Bob used, and sum each up.

It would look like this if running a Bob report:

Bob ReportABCD
15000.00Pears100021005
21000.00Apples100020001

<tbody>
</tbody>


And I would run a separate report for each person, Bob, Brandi, Gerard, etc

Most is easy, this big formula is difficult.

Everything about this is easy regarding total pricing (just a simple multiplication, the description is an easy VLOOKUP from the table, but the sumif-vlookup from the other table, with multiple criteria is hard. Criteria if name matches, and part number matches, to then add up cell values.

Thanks again.
 
Upvote 0
It looks like you're saying you have a list of parts bought by lots of different customers and want to produce a smaller list for each customer just for the parts they bought.

First problem is the order of this output will be the order on the original spreadsheet, not the part number order.

Assuming data is in Sheet1

in Sheet2!A1
=IFERROR(INDEX(Sheet1!$A$2:$J$1000,SMALL(IF((Sheet1!$A$2:$A$1000="Bob"),ROW($A$2:$A$1000)),ROW(A1))-(ROW(A$2)-1),2),"")

in Sheet2!B1
=IFERROR(INDEX(Sheet1!$A$2:$J$1000,SMALL(IF((Sheet1!$A$2:$A$1000="Bob"),ROW($A$2:$A$1000)),ROW(A1))-(ROW(A$2)-1),3),"")

in Sheet2!C1
=IFERROR(INDEX(Sheet1!$A$2:$J$1000,SMALL(IF((Sheet1!$A$2:$A$1000="Bob"),ROW($A$2:$A$1000)),ROW(A1))-(ROW(A$2)-1),4),"")

in Sheet2!D1
=IFERROR(INDEX(Sheet1!$A$2:$J$1000,SMALL(IF((Sheet1!$A$2:$A$1000="Bob"),ROW($A$2:$A$1000)),ROW(A1))-(ROW(A$2)-1),10),"")

NOTE: These are all array formulas
Array formula, use Ctrl-Shift-Enter

Enter the four formulas in a row one at a time.
Then copy them downwards
You should copy them for as many rows as you have on the original sheet.
 
Last edited:
Upvote 0
Ok. This is working quite well. I moved a few things around as the column number was off (not 2, 3, 4, and 10 respectively, which isn't that big of a deal, but its not accumulating the results.

It's simply pulling out where my name is and bringing those values over, even if the part number is duplicated.

I'm looking to add up the total parts used (part numbers and descriptions) which may have been used across different locations, so therefore its an accumulation.

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top