Vlookups + SUM

Lmaonade

Board Regular
Joined
Jan 5, 2018
Messages
52
Hi,

Is there a way to use VLOOKUPS to find a selection of the same reference and add them together to give you a result?

For example.

Capture4.jpg


I've got this list of Holidays that need to be covered.

In Colomn L I have Vlookups that are taking data from another table. In this table the first colomn is "Contract number covered" So it will match the contract number in this table. Now this would be easy if it was just one cover for each holiday but I have multiple covers for each holiday. For instance... Contract #10001 has 3 different covers, so there will be a list in my 2nd table that have 3 rows using contract #10001 , one has 14 days covered the other 2 have 3 days covered each, but it's only pulling data from the first cover which is 14 days.

So my VLookup in L Column is "=VLOOKUP([@[Contract'#]],Table2,10,FALSE)"

Is there a formula to use to calculate any matching contract number together to give a total?

Thanks in advance,
Andy
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi,

Is there a way to use VLOOKUPS to find a selection of the same reference and add them together to give you a result?

For example.

Capture4.jpg


I've got this list of Holidays that need to be covered.

In Colomn L I have Vlookups that are taking data from another table. In this table the first colomn is "Contract number covered" So it will match the contract number in this table. Now this would be easy if it was just one cover for each holiday but I have multiple covers for each holiday. For instance... Contract #10001 has 3 different covers, so there will be a list in my 2nd table that have 3 rows using contract #10001 , one has 14 days covered the other 2 have 3 days covered each, but it's only pulling data from the first cover which is 14 days.

So my VLookup in L Column is "=VLOOKUP([@[Contract'#]],Table2,10,FALSE)"

Is there a formula to use to calculate any matching contract number together to give a total?

Thanks in advance,
Andy

It sounds like you want to use a SUMIFS function.

Without knowing exactly what columns all your data are in, the basic formula would look like:
Rich (BB code):
=SUMIFS(column to add,column containing contact #s ,specific contact # to match)
 
Last edited:
Upvote 0
Hi Jon,

Thanks for the reply.

Ok so in the first table where I'm trying to pull data into I have this.

Capture5.jpg


then in the 2nd table in sheet2, I have this. Which is where the covers will be listed.

Capture6.jpg


So for instance. In cell L6 in my first table I want it to add the 2 covers from the 2nd table. So this should be 11.
 
Upvote 0
Sorry, not sure why that came out so small and blurry,

Here is the 1st picture:
<a href="https://ibb.co/n3xZt7"><img src="https://preview.ibb.co/gc9Q0n/Capture5.jpg" alt="Capture5" border="0"></a><br />

Here is the 2nd picture:
<a href="https://ibb.co/jEz8Ln"><img src="https://preview.ibb.co/cmSHD7/Capture6.jpg" alt="Capture6" border="0"></a><br />
 
Upvote 0
Ah, so I think I may have got it.

Does this look correct?

=SUMIFS('Sheet2'!K:K,'Sheet2'!B:B,[@[Contract'#]])
 
Last edited:
Upvote 0
Ah, so I think I may have got it.

Does this look correct?

=SUMIFS('Sheet2'!K:K,'Sheet2'!B:B,[@[Contract'#]])

Well... does it work? :)

I've never used the @ method of referencing in excel, but assuming it refers to a single cell's value, then I don't see any reason why your formula wouldn't return the results you're looking for.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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