Sum of Unique values with VLOOKUP

ravi2628

Board Regular
Joined
Dec 20, 2017
Messages
221
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi Everyone,

Good Morning,Afternoon,Evening


I required a formula to sum the values using lookup. i have tried the formula but its not working so any one can suggest.

Example.xlsx
D
1Employee ID
21000012
31000013
41000014
51000015
61000016
71000017
81000018
91000019
101000020
111000021
121000022
131000023
141000024
151000025
161000026
171000027
181000028
191000029
201000030
211000031
221000032
231000033
Master Data





Example.xlsx
ABCDEFGH
15
16Employee IDMonthStatusAmountMapping
171000012JanActive335751000012
181000012FebActive335751000012Total Amount908009
191000012MarActive335751000012#VALUE!
201000012AprActive335751000012Excluding Resigned Employee833883
211000012MayActive335751000012#VALUE!
221000012JunResigned466701000012
231000013JanActive464211000013
241000013FebActive464211000013
251000013MarActive464211000013
261000013AprActive464211000013
271000013MayActive464211000013
281000013JunActive464211000013
291000013JulActive464211000013
301000013AugActive464211000013
311000013SepActive464211000013
321000014JanActive263681000014
331000014FebActive263681000014
341000014MarActive263681000014
351000014AprActive263681000014
361000014MayActive263681000014
371000014JunResigned274561000014
381000015JunActive391001000015
391000016JunActive412721000016
401000017JunActive360071000017
411000034SepPlanned46725#N/A
Mapping Data
Cell Formulas
RangeFormula
H19H19=SUM(SUMIFS(D17:D41,'Master Data'!D1:D23,'Mapping Data'!A17:A41))
H21H21=SUM(SUMIFS(D17:D41,'Master Data'!D1:D23,'Mapping Data'!A17:A41,'Mapping Data'!C17:C41,"Active"))
E17:E41E17=VLOOKUP(A17,'Master Data'!$D$2:$D$23,1,0)



Thanks & Regards,
Ravi
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I note that a Microsoft 365 formula was acceptable for you in another thread, so what about these?

ravi2628_2.xlsm
ABCDEFGH
16Employee IDMonthStatusAmount
171000012JanActive33575
181000012FebActive33575Total Amount908009
191000012MarActive33575908009
201000012AprActive33575Excluding Resigned Employee833883
211000012MayActive33575833883
221000012JunResigned46670
231000013JanActive46421
241000013FebActive46421
251000013MarActive46421
261000013AprActive46421
271000013MayActive46421
281000013JunActive46421
291000013JulActive46421
301000013AugActive46421
311000013SepActive46421
321000014JanActive26368
331000014FebActive26368
341000014MarActive26368
351000014AprActive26368
361000014MayActive26368
371000014JunResigned27456
381000015JunActive39100
391000016JunActive41272
401000017JunActive36007
411000034SepPlanned46725
Mapping Data
Cell Formulas
RangeFormula
H19H19=SUM(FILTER(D17:D41,ISNUMBER(MATCH(A17:A41,'Master Data'!D2:D23,0)),0))
H21H21=SUM(FILTER(D17:D41,ISNUMBER(MATCH(A17:A41,'Master Data'!D2:D23,0))*(C17:C41<>"Resigned"),0))
 
Upvote 0
Solution
I note that a Microsoft 365 formula was acceptable for you in another thread, so what about these?

ravi2628_2.xlsm
ABCDEFGH
16Employee IDMonthStatusAmount
171000012JanActive33575
181000012FebActive33575Total Amount908009
191000012MarActive33575908009
201000012AprActive33575Excluding Resigned Employee833883
211000012MayActive33575833883
221000012JunResigned46670
231000013JanActive46421
241000013FebActive46421
251000013MarActive46421
261000013AprActive46421
271000013MayActive46421
281000013JunActive46421
291000013JulActive46421
301000013AugActive46421
311000013SepActive46421
321000014JanActive26368
331000014FebActive26368
341000014MarActive26368
351000014AprActive26368
361000014MayActive26368
371000014JunResigned27456
381000015JunActive39100
391000016JunActive41272
401000017JunActive36007
411000034SepPlanned46725
Mapping Data
Cell Formulas
RangeFormula
H19H19=SUM(FILTER(D17:D41,ISNUMBER(MATCH(A17:A41,'Master Data'!D2:D23,0)),0))
H21H21=SUM(FILTER(D17:D41,ISNUMBER(MATCH(A17:A41,'Master Data'!D2:D23,0))*(C17:C41<>"Resigned"),0))
Hi peter,

good morning. iam not much expert in excel so i use basic formulas only for critical logic i refer to the forum.

Thanks for the logic.
 
Upvote 0

Forum statistics

Threads
1,216,350
Messages
6,130,139
Members
449,560
Latest member
mattstan2012

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