Return a sum values as based on task ID and Ledger by ignoring duplicates

mmr1

Board Regular
Joined
Aug 25, 2020
Messages
80
Office Version
  1. 365
Platform
  1. Windows
Hi,

Required a formula help to as per data available in working sheet, return a sum values in column C as based on task ID and Ledger by ignoring duplicates whatever available in column A and B (task ID and Ledger) in the summary sheet.

Expected results are available in summary sheet column E.


Thanks,
return the sum values by ignoring duplicate criteria.04.10.21.xlsx
ABCDE
2Task IDLedgerTotal ValueExpected Results
310005200020056,053.89
4100052000200-
510005200020172,881.56
6101052000200340,465.94
710105200020194,959.22
8101052000201-
9102052000200125,245.28
10102052000201139,573.04
111100520002006,572.36
12110052000201-
13110152000200-
14110152000200-
151101520002014,848.00
161101B52000200-
171101B52000201-
18110252000200-
19110252000201-
20110252000201-
2111035200020062,566.79
221103520002018,297.90
2312005200020013,083.58
2412005200020110,618.30
Summary


return the sum values by ignoring duplicate criteria.04.10.21.xlsx
ABCDEF
1InternalExternal
2Task IDLedgerTotal ValueTask IDLedgerTotal Value
310005200020172,881.5610005200020056,053.89
410105200020194,959.22101052000200340,465.94
5102052000201139,573.04102052000200125,245.28
6110052000201-1100520002006,572.36
71101520002014,848.00110152000200-
81101B52000201-1101B52000200-
9110252000201-110252000200-
101103520002018,297.9011035200020062,566.79
1112005200020110,618.3012005200020013,083.58
Working Sheet
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about
+Fluff 1.xlsm
ABC
1Task IDLedgerTotal Value
210005200020056053.89
31000520002000
410005200020172881.56
5101052000200340465.9
610105200020194959.22
71010520002010
8102052000200125245.3
9102052000201139573
101100520002006572.363
111100520002010
121101520002000
131101520002000
141101520002014848
151101B520002000
161101B520002010
171102520002000
181102520002010
191102520002010
2011035200020062566.79
211103520002018297.9
2212005200020013083.58
2312005200020110618.3
Master
Cell Formulas
RangeFormula
C2:C23C2=IF(AND(A2=A1,B2=B1),0,IF(--RIGHT(B2),SUMIFS('Working sheet'!$C$3:$C$11,'Working sheet'!$A$3:$A$11,A2,'Working sheet'!$B$3:$B$11,B2),SUMIFS('Working sheet'!$F$3:$F$11,'Working sheet'!$D$3:$D$11,A2,'Working sheet'!$E$3:$E$11,B2)))
 
Upvote 0
Thanks fluff for your solution,

I have an one issue when i insert a new row and copy paste a row like row number 5 (C5) values to row number 8 (C8) it will return a same results instead of blank in C8.

In my original sheet it may be repeated a same codes in many times, i want values to be fixed in only one time when it appeared first rest of all when it repeated the same to be return as a blank.

highlighted one in sample sheet is the value already existed in C5.

return the sum values by ignoring duplicate criteria.04.10.21.xlsx
ABC
1Task IDLedgerTotal Value
210005200020056,053.89
3100052000200-
410005200020172,881.56
5101052000200340,465.94
610105200020194,959.22
7101052000201-
8101052000200340,465.94
9102052000200125,245.28
10102052000201139,573.04
111100520002006,572.36
12110052000201-
13110152000200-
14110152000200-
151101520002014,848.00
161101B52000200-
171101B52000201-
18110252000200-
19110252000201-
20110252000201-
2111035200020062,566.79
221103520002018,297.90
2312005200020013,083.58
2412005200020110,618.30
Summary
Cell Formulas
RangeFormula
C2:C24C2=IF(AND(A2=A1,B2=B1),0,IF(--RIGHT(B2),SUMIFS('Working Sheet'!$C$3:$C$11,'Working Sheet'!$A$3:$A$11,A2,'Working Sheet'!$B$3:$B$11,B2),SUMIFS('Working Sheet'!$F$3:$F$11,'Working Sheet'!$D$3:$D$11,A2,'Working Sheet'!$E$3:$E$11,B2)))
 
Upvote 0
Ok, how about
Excel Formula:
=IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1,IF(--RIGHT(B2),SUMIFS('Working sheet'!$C$3:$C$11,'Working sheet'!$A$3:$A$11,A2,'Working sheet'!$B$3:$B$11,B2),SUMIFS('Working sheet'!$F$3:$F$11,'Working sheet'!$D$3:$D$11,A2,'Working sheet'!$E$3:$E$11,B2)),0)
 
Upvote 0
Thanks for the response,

somewhere it returns in blank cells FALSE where task id ledger repeated continuously 3 to 4 times, could you please advise to this.
 
Upvote 0
Can you post some sample data showing that problem.
 
Upvote 0
Sorry for late response

here is the sample data for your reference.

Book3
ADAB
6Task CodeLedger CodesSep-21
7
81000520002016,563.00
91000520002001,421.00
101010520002005,654.00
111010520002012,536.00
12101052000200FALSE
13101052000201FALSE
1410205200020065,654.00
3215105200020036,584.00
331510520002014,641.60
3416005200020037,063.45
35160052000201-
36160052000200FALSE
37160052000201FALSE
38160052000200FALSE
39160052000201FALSE
40160052000200FALSE
41160052000201FALSE
Summary
Cell Formulas
RangeFormula
AB8:AB14,AB32:AB41AB8=IF(COUNTIFS(A$8:A8,A8,D$8:D8,D8)=1,IF(--RIGHT($D8),SUMIFS('Working Sheet'!$G$5:$G$31,'Working Sheet'!$D$5:$D$31,Summary!$D8,'Working Sheet'!$A$5:$A$31,Summary!$A8),SUMIFS('Working Sheet'!$M$5:$M$31,'Working Sheet'!$J$5:$J$31,Summary!$D8,'Working Sheet'!$A$5:$A$31,Summary!$A8)))



Book3
ADGIJM
51000520002016,563.001000520002001,421.00
61010520002012,536.001010520002005,654.00
710205200020158,569.0010205200020065,654.00
1615005200020114,315.4015005200020011,819.00
171510520002014,641.6015105200020036,584.00
18160052000201-16005200020037,063.45
Working Sheet
 
Upvote 0
Thanks for that, you are missing the ,0 from the end of the formula, it should be
Excel Formula:
=IF(COUNTIFS(A$8:A8,A8,D$8:D8,D8)=1,IF(--RIGHT($D8),SUMIFS('Working sheet'!$G$5:$G$31,'Working sheet'!$D$5:$D$31,$D8,'Working sheet'!$A$5:$A$31,$A8),SUMIFS('Working sheet'!$M$5:$M$31,'Working sheet'!$J$5:$J$31,$D8,'Working sheet'!$A$5:$A$31,$A8)),0)
Also you should not refer to the sheet name the formula is on as it can cause problems.
 
Upvote 0
Solution
Solved,

Many Thanks Fluff for your formula solution.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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