Selective extraction of data from a 'master' table to sub-tables for 'T Accounts'

absolutelyprobable

New Member
Joined
Jan 30, 2006
Messages
37
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have a transactions table from which I need to extract the relevant data for 'T Account' tables (the reason for having the big list as the driver is my use of multiple-currencies).

I found a fantastic formula that has gotten me part of the way (from cell A7):

Excel Formula:
=IFERROR(INDEX($P$1:$P$4967,SMALL(IF($X$1:$Y$4967=A$3,ROW($X$1:$Y$4967)),ROW()-ROW($A$7)+1)),"")
(and the 'magic' from this which I don't understand at all is that I need to use Shift-ctrl-enter for it)

Using this works for the first three columns whereby it finds txs for the T Account in question and lists the data that is valid both for dr and cr txs.

Then I come unstuck due to not being able to decipher from this copied formula how to add additional conditions and only getting results from the same row.

I've come up with three possible approaches to solve this. I think my preferred would be to add a hidden column that simply gives me row numbers of matched txs and lets me use simpler understandable (for me) formulae to populate the rest of the row.

The next, would be to get to understand the formula I'm using well-enough, with help, to be able to:

  1. Have the Account column D, where the the T Account name (A3) is in the Debit column (X) to show the corresponding Credit account name (Y) - and the same for Account col. K where the T Account name is in H3.
  2. Have the DR column E populate from the correct row from Col T where the T Account name is in the Debit col. (X) and zero if it is in the Credit col. (Y) - and vice versa for the CR col. F (and the corresponding for cols L & M).
The third approach, which I'm also intrigued by is how, if we ignore the part-solution I've got, given what I want to accomplish, some experts here might approach the problem.

This is the mini-sheet I've put together with some data to play with

TrustedKeyFinancesDashboard2022-10-08.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1BTC T Accounts
2Data source
3dr acc. 1combined for bal sheets:0.0000.000cr acc. 1combined for bal sheets:0.0000.000(converted)
4c/f:0.0000.000c/o:0.0000.000
5dr & cr totals:0.0000.000dr & cr totals:0.0000.000TX refDateCurrency Amount BTCUSDGBPDescriptionDebitCredit
6TX refDateDescriptionAccountDRCRTX refDateDescriptionAccountDRCR12022-08-23BTC0.500.5107409129a valid onedr acc. 1cr acc. 1
712022-08-23a valid one???12022-08-23a valid one???22022-08-27USD5,000.000.23277550004250an ignored onedr acc. 2cr acc. 2
832022-08-31another valid one???32022-08-31another valid one???32022-08-31BTC0.200.242963651.6another valid onedr acc. 1cr acc. 1
9   ???   ???42022-09-04GBP2,000.000.1095412352.942000another ignored onedr acc. 3cr acc. 3
Sheet2
Cell Formulas
RangeFormula
E3,L3E3=IF(E4+E5>F4+F5,E4+E5-(F4+F5),0)
F3,M3F3=IF(F4+F5>E4+E5,F4+F5-(E4+E5),0)
L5:M5,E5:F5E5=SUM(E7:E167)
H7:H9,A7:A9A7=IFERROR(INDEX($P$1:$P$4967,SMALL(IF($X$1:$Y$4967=A$3,ROW($X$1:$Y$4967)),ROW()-ROW($A$7)+1)),"")
I7:I9,B7:B9B7=IFERROR(INDEX($Q$1:$Q$4967,SMALL(IF($X$1:$Y$4967=A$3,ROW($X$1:$Y$4967)),ROW()-ROW($B$7)+1)),"")
J7:J9,C7:C9C7=IFERROR(INDEX($W$1:$W$4967,SMALL(IF($X$1:$Y$4967=A$3,ROW($X$1:$Y$4967)),ROW()-ROW($C$7)+1)),"")
Press CTRL+SHIFT+ENTER to enter array formulas.


Incidentally, thanks to the team at Mr. Excel for your incredibly long service👏 🤝Also a massive thanks to the community who (even if there are very few of the same faces as from back then) have jointly kept this as somewhere valuable to find solutions for so many years such that you're still here when I need you🙌👌 I saw when I eventually managed to log in with ancient credentials that it was in 2006/7 I was last active here:LOL:
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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