A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Use an Excel Table named SourceData. Create a second table with one row per unique Transaction ID. The formulas below assume exactly two rows per transaction, with one Asset/Liability row and one Expense/Income row.
Account Group
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Asset")+(SourceData[Account Group]="Liability")),SourceData[Account Group]))
Category Group
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Expense")+(SourceData[Account Group]="Income")),SourceData[Account Group]))
Account Type
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Asset")+(SourceData[Account Group]="Liability")),SourceData[Account Type]))
Category Type
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Expense")+(SourceData[Account Group]="Income")),SourceData[Account Type]))
Account Name
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Asset")+(SourceData[Account Group]="Liability")),SourceData[Account Name]))
Category Name
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Expense")+(SourceData[Account Group]="Income")),SourceData[Account Name]))
Amount
=LET(ID,[@[Transaction ID#]],XLOOKUP(1,(SourceData[Transaction ID#]=ID)*((SourceData[Account Group]="Expense")+(SourceData[Account Group]="Income")),SourceData[Amount]))
Transaction Date, Transaction Description, Vendor, Customer
=XLOOKUP([@[Transaction ID#]],SourceData[Transaction ID#],SourceData[Transaction Date])
Replace Transaction Date with the respective column name for each formula.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin