Hi,
How can I get the result in as mentioned in 'Result' Sheet ? .My raw data is in 'Data' sheet.Lookup column is A.
Hi,
How can I get the result in as mentioned in 'Result' Sheet ? .My raw data is in 'Data' sheet.Lookup column is A.
If you have the latest (beta) version of 365:
=VSTACK(A1:G1,HSTACK(UNIQUE(A2:B10),DROP(DROP(GROUPBY(A2:A10&B2:B10,C2:G10,SUM),,1),-1)))
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
C2=IFERROR(IF(Result!$A2<>"",SUMIFS(INDEX(Data!$C$2:$G$100,,MATCH(Result!C$1,Data!$C$1:$G$1,0)),Data!$A$2:$A$100,Result!$A2,Data!$B$2:$B$100,Result!$B2),""),"")
Copy across and down
All you have to do is change your update channel to the beta channel: Account > change to Miscrosoft 365 Insider, then run an update.
If you don't have the beta version, or need to share it with other O365 users who do not have the beta version, then use:
Formula:
=LET(
A,Data!A2:B10,
B,Data!C2:G10,
C,UNIQUE(INDEX(A,SEQUENCE(ROWS(A)),{1,2})),
VSTACK(A1:G1,HSTACK(C,DROP(REDUCE("",INDEX(C,,1),LAMBDA(x,y,VSTACK(x,BYCOL(B,LAMBDA(z,SUMIF(INDEX(A,,1),y,z)))))),1))))
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
Mindblowing Glenn.You did it.
Thanks.
Last edited by paradise2sr; 01-15-2024 at 04:36 AM.
If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.
Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
Glenn,
Why UNIQUE(INDEX(A,SEQUENCE(ROWS(A)),{1,2})) rather than just UNIQUE(A) out of interest?
Everyone who confuses correlation and causation ends up dead.
I little bit changes done in Glenn formula referencing header to the data sheet and works like a charm.
![]()
=LET( A,Data!A2:B10, B,Data!C2:G10, C,UNIQUE(INDEX(A,SEQUENCE(ROWS(A)),{1,2})), VSTACK(Data!A1:G1,HSTACK(C,DROP(REDUCE("",INDEX(C,,1),LAMBDA(x,y,VSTACK(x,BYCOL(B,LAMBDA(z,SUMIF(INDEX(A,,1),y,z)))))),1))))
Thanx Ali & Caracalla![]()
Now replete with coffee...
use this:
=LET(
A,Data!A2:B10,
B,Data!C2:G10,
C,UNIQUE(A),
VSTACK(A1:G1,HSTACK(C,DROP(REDUCE("",INDEX(C,,1),LAMBDA(x,y,VSTACK(x,BYCOL(B,LAMBDA(z,SUMIF(INDEX(A,,1),y,z)))))),1))))
Hi,Glenn, I came across one more things.My A column data must be unique,Sometimes what happen B column name might be different but A column code is always the unique.So currently I am have used your formula at A1 Sheet in which it is displaying Rose twice as one of the B column data is 'Roses' so I want to skip based on unique data already achieved at A3.So there seems to be duplicate in such type of cases where one or more B Column name might be different but A column data is unique irrespective of name in B column.This happens frequently.I have given a sample example of Rose & Roses only. I hope you understand this.
Hence,kindly modify your code accordingly and I have mentioned the actual result at I2:O6 of Result worksheet.
Last edited by paradise2sr; 01-15-2024 at 09:00 AM.
tRY:
Formula:
=LET(A,Data!A2:G10,B,Data!A1:G1,C,UNIQUE(INDEX(A,,1)),D,XLOOKUP(C,INDEX(A,,1),INDEX(A,,2)),E,DROP(REDUCE("",C,LAMBDA(x,y,VSTACK(x,BYCOL(DROP(A,,2),LAMBDA(z,SUMIF(INDEX(A,,1),y,z)))))),1),VSTACK(B,HSTACK(C,D,E)))
Thanx Glenn.
Power Query![]()
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"test", "Name/Date"}, "Attribute", "Value"), #"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"test", "Name/Date", "Attribute"}, {{"sum", each List.Sum([Value]), type number}}), #"Pivoted Column" = Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[Attribute]), "Attribute", "sum") in #"Pivoted Column"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks