Need to make a dynamic table

metaman15

New Member
Joined
Apr 4, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi everyone, thanks for taking a look.

I have users who need to input values into a sheet such as below:

Table A
DateDonor #Festival PartyRennovation DonationsFood DonationsInternational Relief DonationsTotal
3/1/20231001011Christmas$101.00$51.00$152.00
3/2/20231001012Easter$201.00$151.00$352.00
3/3/20231001013Easter$301.00$201.00$101.00$603.00



And need a dynamic table for the output such as below:

Table B
DateDonorAmountPurposeClass
3/1/20231001011$101.00ChristmasFood Donations
3/1/20231001011$51.00ChristmasInternational Relief Donations
3/2/20231001012$201.00EasterRennovation Donations
3/2/20231001012$150.00EasterFood Donations
3/3/20231001013$301.00EasterRennovation Donations
3/3/20231001013$201.00EasterFood Donations
3/3/20231001013$101.00EasterInternational Relief Donations


The output table (Table B) needs to update every time a new row is added to Table A.

I tried many different ideas, (v and hlookup, if statements, index), etc. I need Table B to cycle through columns D-F in Table A and read if there are any values, and if so, create a row in Table B that would populate the amount (Column C, Table B), and the rest of the information.

But I cannot find a way to properly do this, can anyone help? Thank you.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFG
1DateDonor #Festival PartyRennovation DonationsFood DonationsInternational Relief DonationsTotal
201/03/20231001011Christmas10151152
302/03/20231001012Easter201151352
403/03/20231001013Easter301201101603
5
6
7
8
9
1001/03/20231001011101ChristmasFood Donations
1101/03/2023100101151ChristmasInternational Relief Donations
1202/03/20231001012201EasterRennovation Donations
1302/03/20231001012151EasterFood Donations
1403/03/20231001013301EasterRennovation Donations
1503/03/20231001013201EasterFood Donations
1603/03/20231001013101EasterInternational Relief Donations
17
Summary
Cell Formulas
RangeFormula
A10:E16A10=LET(Data,D2:F4,HSTACK(TOCOL(IF(Data<>"",A2:A4,1/0),2),TOCOL(IF(Data<>"",B2:B4,1/0),2),TOCOL(Data,1),TOCOL(IF(Data<>"",C2:C4,1/0),2),TOCOL(IF(Data<>"",D1:F1,1/0),2)))
Dynamic array formulas.
 
Upvote 0
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFG
1DateDonor #Festival PartyRennovation DonationsFood DonationsInternational Relief DonationsTotal
201/03/20231001011Christmas10151152
302/03/20231001012Easter201151352
403/03/20231001013Easter301201101603
5
6
7
8
9
1001/03/20231001011101ChristmasFood Donations
1101/03/2023100101151ChristmasInternational Relief Donations
1202/03/20231001012201EasterRennovation Donations
1302/03/20231001012151EasterFood Donations
1403/03/20231001013301EasterRennovation Donations
1503/03/20231001013201EasterFood Donations
1603/03/20231001013101EasterInternational Relief Donations
17
Summary
Cell Formulas
RangeFormula
A10:E16A10=LET(Data,D2:F4,HSTACK(TOCOL(IF(Data<>"",A2:A4,1/0),2),TOCOL(IF(Data<>"",B2:B4,1/0),2),TOCOL(Data,1),TOCOL(IF(Data<>"",C2:C4,1/0),2),TOCOL(IF(Data<>"",D1:F1,1/0),2)))
Dynamic array formulas.
Thanks for the quick response! This works for the most part, the only problem is that if I add a row of information to Table A, it doesn't automatically update Table B with the new information. Is there any way to do that?
 
Upvote 0
Thanks for the quick response! This works for the most part, the only problem is that if I add a row of information to Table A, it doesn't automatically update Table B with the new information. Is there any way to do that?
I was able to resolve this by changing the D4:F4 to F100 instead, thanks!
 
Upvote 0
You can just increase the range like
Excel Formula:
=LET(Data,D2:F9,HSTACK(TOCOL(IF(Data<>"",A2:A9,1/0),2),TOCOL(IF(Data<>"",B2:B9,1/0),2),TOCOL(Data,1),TOCOL(IF(Data<>"",C2:C9,1/0),2),TOCOL(IF(Data<>"",D1:F1,1/0),2)))
Just don't go to far. ;)
 
Upvote 0
Hello. A Power Query based solution can also result here:

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Removed_Columns = Table.RemoveColumns(Source,{"Total"}),
    Unpivoted_Other_Columns = Table.UnpivotOtherColumns(Removed_Columns, {"Date", "Donor", "Purpose"}, "Class", "Amount"),
    Reordered_Columns = Table.ReorderColumns(Unpivoted_Other_Columns,{"Date", "Donor", "Class", "Amount", "Purpose"}),
    Changed_Type = Table.TransformColumnTypes(Reordered_Columns,{{"Date", type date}})
in
    Changed_Type

DateDonorPurposeAABBCCTotalDateDonorClassAmountPurpose
24/2/2023​
1001011Christmas
944,10​
273,15​
1.602,40​
24/2/2023​
1001011​
BB
944,1​
Christmas
27/3/2023​
1001012Easter
479,67​
195,69​
1.302,85​
24/2/2023​
1001011​
CC
273,15​
Christmas
4/4/2023​
1001013Other
638,73​
1.495,69​
2.334,69​
27/3/2023​
1001012​
AA
479,67​
Easter
3/2/2023​
1001014Christmas
487,11​
574,62​
1.790,05​
27/3/2023​
1001012​
CC
195,69​
Easter
5/3/2023​
1001015Easter
128,05​
696,17​
1.253,91​
4/4/2023​
1001013​
AA
638,73​
Other
2/3/2023​
1001016Other
1.124,40​
925,61​
2.547,77​
4/4/2023​
1001013​
BB
1495,69​
Other
31/3/2023​
1001017Christmas
1.222,76​
257,68​
1.937,65​
3/2/2023​
1001014​
AA
487,11​
Christmas
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,053
Members
449,206
Latest member
Healthydogs

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