Summing all instances of a VLOOKUP Formula

EMCNEIL

New Member
Joined
Dec 10, 2019
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
It seems so easy but stumped!

Here is the formula:

=IFERROR(IF(F14="Basic", VLOOKUP(E14,'DAI Obligations'!$K$1:$AV$367,30, FALSE), 0),0)

If Cell F14 is "Basic", it picks up the Requisition Number in Cell E14 and finds a match in the DAI Obligation worksheet and brings back the number in column 30, which are the $$.

It's fine until there are multiple instances of the exact same Requisition Number, at which point it only picks up one of them then stops.

Looking for a way to SUM all of the instances, otherwise our data is no good. I have been thus far very unsuccessful.

I'd be super grateful for any help. Optimally I would just like to adjust the formula.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try:
Change ranges to match your data.

Book1
EFG
13Sum
1412Basic59
Sheet1
Cell Formulas
RangeFormula
G14G14=IF($F$14="Basic",SUMPRODUCT(--('DAI Obligation '!$A$2:$A$10=Sheet1!$E$14),'DAI Obligation '!$AD$2:$AD$10),0)


DAI Obligation
Book1
ABACAD
1REC#your col 30
2130
32220
41212
52515
61216
71623
8161
91225
10126
DAI Obligation
 
Upvote 0
Hi & welcome to MrExcel.
Have a look at the Sumif function
 
Upvote 0
Perhaps
=SUMIF('Dai Obligations'!$K:$K,E14,'Dai Obligations'!$AN:$AN)


Edit: Ah @Fluff was faster to the draw :)
 
Upvote 0
Try:
Change ranges to match your data.

Book1
EFG
13Sum
1412Basic59
Sheet1
Cell Formulas
RangeFormula
G14G14=IF($F$14="Basic",SUMPRODUCT(--('DAI Obligation '!$A$2:$A$10=Sheet1!$E$14),'DAI Obligation '!$AD$2:$AD$10),0)


DAI Obligation
Book1
ABACAD
1REC#your col 30
2130
32220
41212
52515
61216
71623
8161
91225
10126
DAI Obligation


Perhaps
=SUMIF('Dai Obligations'!$K:$K,E14,'Dai Obligations'!$AN:$AN)


Edit: Ah @Fluff was faster to the draw :)

Thanks, but that leaves out the other factors:

Sup Matls worksheet: The calculation is in the Sup Matls Worksheet. The requisition number (column E) is on the worksheet, as well as the criteria "Basic." (column F)

The criteria "Basic" needs to be met first. The drop down menu has other options and none of them are to be included in the calculation.

Then the requisition Number gets picked up (each row in column E in Sup Matl) Then it looks for the matching requisition # (column K on the 'DAI Obligations' worksheet) . The $$ needing to be summed up are in column AD or 30 of the DAI Obligations Worksheet.
 
Upvote 0
Try:
Change ranges to match your data.

Book1
EFG
13Sum
1412Basic59
Sheet1
Cell Formulas
RangeFormula
G14G14=IF($F$14="Basic",SUMPRODUCT(--('DAI Obligation '!$A$2:$A$10=Sheet1!$E$14),'DAI Obligation '!$AD$2:$AD$10),0)


DAI Obligation
Book1
ABACAD
1REC#your col 30
2130
32220
41212
52515
61216
71623
8161
91225
10126
DAI Obligation


It looked like it would work: =IF($F9="Basic",SUMPRODUCT(--('DAI Obligations'!$K$2:$K$200='Sup Matl'$E14),'DAI Obligation '!$AD$2:$AD$200),0)

but it's only recognizing it as text! Tried the control/shift/return and got nothing.

Sup Matls worksheet: The calculation is in the Sup Matls Worksheet. The requisition number (column E) is on the worksheet, as well as the criteria "Basic." (column F)

The criteria "Basic" needs to be met first. The drop down menu has other options and none of them are to be included in the calculation.

Then the requisition Number gets picked up (each row in column E in Sup Matl) Then it looks for the matching requisition # (column K on the 'DAI Obligations' worksheet) . The $$ needing to be summed up are in column AD or 30 of the DAI Obligations Worksheet.

?? So frustrating.




 
Upvote 0
How about
=IFERROR(IF(F14="Basic",SUMIF('DAI Obligations'!$K$1:$K$367,E14,'DAI Obligations'!$AD$1:$AD$367),0),0)

However you vlookup is returning values from col AN, not col AD
 
Upvote 0
How about
=IFERROR(IF(F14="Basic",SUMIF('DAI Obligations'!$K$1:$K$367,E14,'DAI Obligations'!$AD$1:$AD$367),0),0)

However you vlookup is returning values from col AN, not col AD
You are absolutely right, fixed all of the reference points, IT WORKS!!!!! Thank you Thank you Thank you!!!!!??
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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