Extend formula VLOOKUP to find multiple vallues

emoes

New Member
Joined
Feb 18, 2016
Messages
6
Hello,

I'm using some years now the following formula to lookup value:
VBA Code:
=IF(ISERROR(VLOOKUP($D2;Invoice!K:L;2;FALSE));"_ONBEKEND";VLOOKUP($D2;Invoice!K:L;2;FALSE))

I would like to extend the formula with "SUM" so if the Search value (in this case D2) is found multiple times in Columns K:L it will sum up the amount instead of only return the first found value.
My knowledge about formulas is not that good that I can add this myself.

Thnkas for your help.
Emoes
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
How about
Excel Formula:
=SUMIFS(Invoice!L:L,Invoice!K:K,D2)
 
Upvote 0
Solution
How about
Excel Formula:
=SUMIFS(Invoice!L:L,Invoice!K:K,D2)
Hello Fluff,
Thanks for your quick reply. This works good.
I actually like also "my" formula, because it's not finding the search value it will return "_Onbekend" and is also preventing an error code.
So it is nice to have if both could be combined. But as said, yours is doing what I asked.

Emoes
 
Upvote 0
The sumifs should not give an error and if the D2 value is not found the formula should return 0
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,635
Messages
6,120,660
Members
448,975
Latest member
sweeberry

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