Can someone please explain this formula to me

Martin sherk

Board Regular
Joined
Sep 11, 2022
Messages
94
Office Version
  1. 365
  2. 2016
Hello Everyone,

so I am using the below formula for my reconciliation between ERP and bank but I don't quite understand it.

Formulas are in G2 and F2

Copy of GL CLEAEING_1 (3).XLSX
ABCDEFGH
1AccountAssignmentDocument Header TextDocument NumberAmount in local currencyLocal Currency
226129455422002132022542200213(251.55)251.55-1 AED
326129455422002152022542200215(284.17)284.17-1 AED
426129455422002172022542200217(1,175.00)1175-1 AED
526129455422002212022542200221(389.07)389.07-1xAED
626129455422002222022542200222(5,434.85)5434.85-1 AED
CTS
Cell Formulas
RangeFormula
F2:F6F2=IF(E2<0,-E2&"-"&COUNTIF(E$2:E2,E2),E2&"-"&COUNTIF(E$2:E2,E2))
G2:G6G2=IF(COUNTIF($F$2:$F$244,F2)=2,"x","")
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
G2 inserts an X if there is a positive number such as 389.07 as well as negative number 389.07.

The alternative that I show considers the Document Number as well as counting the related positive and negative numbers.

T202211.xlsm
ABCDEF
13AccountDocument NumberAmount in local currency
142612945542200213-251.55FALSE
152612945542200215-284.17FALSE
162612945542200217-1175FALSE
172612945542200221-389.07TRUE
182612945542200222-5434.85FALSE
192612945542200221389.07TRUE
1f
Cell Formulas
RangeFormula
F14:F19F14=COUNTIFS($D$14:$D$19,D14,$E$14:$E$19,E14)=COUNTIFS($D$14:$D$19,D14,$E$14:$E$19,-E14)
 
Upvote 0
Solution
If you want a single entry that will compete the calculations and prepare the report, review the following.
Formula is in H14
The formula sums the amounts (a positive + a negative such as 389.07 will yield 0 i.e. Reconciled)
The reconciled show with 0
The unreconciled numbers show with Document number and amount.

[
T202211.xlsm
ABCDEGHI
13AccountBCDocument Text IDAmountDocumentsAmount
142612945542200213-251.555422002130.00
152612945542200215-284.175422002210.00
162612945542200217-1175542200215-284.17
172612945542200221-389.07542200217-1,175.00
182612945542200222-5434.85542200222-5,434.85
192612945542200213251.55
202612945542200221389.07
1f
Cell Formulas
RangeFormula
H14:I18H14=LET(u,UNIQUE(FILTER(rN,rN>"")),SORT(HSTACK(u,SUMIFS(rAmt,rN,u)),2,-1))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
rAmt='1f'!$E$14:$E$20H14
rN='1f'!$D$14:$D$20H14
 
Upvote 0
If you want a single entry that will compete the calculations and prepare the report, review the following.
Formula is in H14
The formula sums the amounts (a positive + a negative such as 389.07 will yield 0 i.e. Reconciled)
The reconciled show with 0
The unreconciled numbers show with Document number and amount.

[
T202211.xlsm
ABCDEGHI
13AccountBCDocument Text IDAmountDocumentsAmount
142612945542200213-251.555422002130.00
152612945542200215-284.175422002210.00
162612945542200217-1175542200215-284.17
172612945542200221-389.07542200217-1,175.00
182612945542200222-5434.85542200222-5,434.85
192612945542200213251.55
202612945542200221389.07
1f
Cell Formulas
RangeFormula
H14:I18H14=LET(u,UNIQUE(FILTER(rN,rN>"")),SORT(HSTACK(u,SUMIFS(rAmt,rN,u)),2,-1))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
rAmt='1f'!$E$14:$E$20H14
rN='1f'!$D$14:$D$20H14
Unfortunately Hstach formula is not yet working in my office 365.
 
Upvote 0
G2 inserts an X if there is a positive number such as 389.07 as well as negative number 389.07.

The alternative that I show considers the Document Number as well as counting the related positive and negative numbers.

T202211.xlsm
ABCDEF
13AccountDocument NumberAmount in local currency
142612945542200213-251.55FALSE
152612945542200215-284.17FALSE
162612945542200217-1175FALSE
172612945542200221-389.07TRUE
182612945542200222-5434.85FALSE
192612945542200221389.07TRUE
1f
Cell Formulas
RangeFormula
F14:F19F14=COUNTIFS($D$14:$D$19,D14,$E$14:$E$19,E14)=COUNTIFS($D$14:$D$19,D14,$E$14:$E$19,-E14)
perfect! that's something to learn from you. Thank you for your time, sir!
 
Upvote 0
G2 inserts an X if there is a positive number such as 389.07 as well as negative number 389.07.

The alternative that I show considers the Document Number as well as counting the related positive and negative numbers.

T202211.xlsm
ABCDEF
13AccountDocument NumberAmount in local currency
142612945542200213-251.55FALSE
152612945542200215-284.17FALSE
162612945542200217-1175FALSE
172612945542200221-389.07TRUE
182612945542200222-5434.85FALSE
192612945542200221389.07TRUE
1f
Cell Formulas
RangeFormula
F14:F19F14=COUNTIFS($D$14:$D$19,D14,$E$14:$E$19,E14)=COUNTIFS($D$14:$D$19,D14,$E$14:$E$19,-E14)
what if I want to reconcile just the Amounts in column E and ignore the Documents no. in column D?
 
Upvote 0
"what if I want to reconcile just the Amounts in column E and ignore the Documents no. in column D?"

I used a Table and with choice False it shows the unreconciled amounts.

T202211x.xlsm
ABCDEF
12Sum-6,894.02
13AccountBCDocument Text IDAmountResult
152612945542200215-284.17FALSE
162612945542200217-1175FALSE
182612945542200222-5434.85FALSE
21
22
1ff
Cell Formulas
RangeFormula
E12E12=SUBTOTAL(109,rAmt)
F15:F16,F18F15=COUNTIFS($E$14:$E$20,E15)=COUNTIFS($E$14:$E$20,-E15)
Named Ranges
NameRefers ToCells
'1ff'!rAmt='1ff'!$E$14:$E$20E12, F18, F15:F16


T202211x.xlsm
ABCDEF
12Sum0.00
13AccountBCDocument Text IDAmountResult
142612945542200213-251.55TRUE
172612945542200221-389.07TRUE
192612945542200213251.55TRUE
202612945542200221389.07TRUE
21
22
1ff
Cell Formulas
RangeFormula
E12E12=SUBTOTAL(109,rAmt)
F14,F17,F19:F20F14=COUNTIFS($E$14:$E$20,E14)=COUNTIFS($E$14:$E$20,-E14)
Named Ranges
NameRefers ToCells
'1ff'!rAmt='1ff'!$E$14:$E$20E12, F19:F20, F17, F14
 
Upvote 0
"what if I want to reconcile just the Amounts in column E and ignore the Documents no. in column D?"

I used a Table and with choice False it shows the unreconciled amounts.

T202211x.xlsm
ABCDEF
12Sum-6,894.02
13AccountBCDocument Text IDAmountResult
152612945542200215-284.17FALSE
162612945542200217-1175FALSE
182612945542200222-5434.85FALSE
21
22
1ff
Cell Formulas
RangeFormula
E12E12=SUBTOTAL(109,rAmt)
F15:F16,F18F15=COUNTIFS($E$14:$E$20,E15)=COUNTIFS($E$14:$E$20,-E15)
Named Ranges
NameRefers ToCells
'1ff'!rAmt='1ff'!$E$14:$E$20E12, F18, F15:F16


T202211x.xlsm
ABCDEF
12Sum0.00
13AccountBCDocument Text IDAmountResult
142612945542200213-251.55TRUE
172612945542200221-389.07TRUE
192612945542200213251.55TRUE
202612945542200221389.07TRUE
21
22
1ff
Cell Formulas
RangeFormula
E12E12=SUBTOTAL(109,rAmt)
F14,F17,F19:F20F14=COUNTIFS($E$14:$E$20,E14)=COUNTIFS($E$14:$E$20,-E14)
Named Ranges
NameRefers ToCells
'1ff'!rAmt='1ff'!$E$14:$E$20E12, F19:F20, F17, F14
perfect! Worked smoothly. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
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