Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excel function to like XLOOKUP to return range

I have a data structure in excel where I want to generate a aggregated table based on a more detailed table based on some clustering e.g. Tasks -> Projects -> Investmentcluster.

In the aggregated projectoverview I use UNIQUE to get the list of Projects and then SUMIF and XLOOKUP to get sums or the first value from the original table columns I am interested in.

However I have one column, where I need all the entries beeing found concatinated. I would use something like concat(filter(l, x: x == "pName")) in programming languages. I already found the CONCAT function… but how do I get another function that returns a range I can feed into CONCAT?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Orignal Sheet

Project Task Invest Description
P1 T1 1 ABC
P1 T2 1 ABC
P1 T3 1 ABC
P1 T4 1 ABC
P2 T5 1 ABC
P2 T6 1 ABC
P2 T7 1 ABC

Target Sheet

Project Invest Description
P1 4 ABC, ABC, ABC, ABC
P2 3 ABC, ACB, ABC

My problem lies in the Description column.

Greetings,
Xlaech

>Solution :

Have a go with:

enter image description here

Formula in F1:

=REDUCE(INDEX(A1:D1,{1,2,4}),UNIQUE(A2:A8),LAMBDA(x,y,VSTACK(x,HSTACK(y,SUMIF(A2:A8,y,C2:C8),TEXTJOIN(", ",,REPT(D2:D8,A2:A8=y))))))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading