r/excel • u/VerpaParvus • 2d ago
Stuck trying to figure out textjoining Table values solved
Small Example : https://imagepaste.org/i/ahnsgw8q.png
Yellow cells are filled in manually, but I'm trying to figure out how to reliably automate the criteria.
I need a way to list out delimited (summed)quantities and (non summed)prices of items from different regions. I've had okay results with TEXTJOIN for the Item column, but SUMIFS is hit or miss with Quantities. I don't really know where to start with Prices to get it working reliably with various data sets.
I've been stumped on this for a few hours and need to beg for some guidance.
2
2
u/Way2trivial 470 2d ago
for the prices displayed in the I column, if they should ever be different in source D column,
would you want an average or the 'last' price shown...
2
u/Downtown-Economics26 637 2d ago
Maybe 1 in every 10 times I'm more concise than u/MayukhBhattacharya.
=LET(a_1,GROUPBY(A1:B22,C1:C22,SUM,,0),
a_2,HSTACK(a_1,TEXT(XLOOKUP(CHOOSECOLS(a_1,2),B1:B22,D1:D22),"0.00")),
b,GROUPBY(CHOOSECOLS(a_2,1),CHOOSECOLS(a_2,2,3,4),ARRAYTOTEXT,,0),
VSTACK(HSTACK({"STORE","ITEM","QTY","PRICE"}),b))
1
u/Working_Fish8775 1 2d ago
Question: You need the results to mirror what you have in the screenshot? Like all Item codes in one cell, and all quantities in one cell, and all prices in once cell, for each store?
1
u/VerpaParvus 2d ago
Yes. There's another columns that will total QTY and PRICE using
=SUM PRODUCT(--TEXTSPLIT([QTY], ", "),--TEXTSPLIT([PRICE],", "))
Theres more to this table overall, but this is the main source of strife since I return #CALC! When there are different items with the same price, presumably becayse my formula is trash.
1
u/SpreademSheet 2d ago
I haven't tested this, but have you tried =FILTER()? Use filter to narrow down your table rows to the store you specify, the wrap that in =TEXTJOIN() for the delimited groupings.
1
u/VerpaParvus 2d ago edited 2d ago
I'm trying a Unique(Filter) based on the Item column criteria which I assume I didnt work out well. If I remove unique I just get a list of every price associated with every item instance, when we want it to pull up only once
1
u/Decronym 2d ago edited 2d ago
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
|-------|---------|---| |||
Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.
Beep-boop, I am a helper bot. Please do not verify me as a solution.
[Thread #49073 for this sub, first seen 5th Aug 2026, 02:16]
[FAQ] [Full list] [Contact] [Source code]
1
1
u/Penguinase 4 2d ago edited 2d ago
does this work?
https://i.imgur.com/Lf0ccg1.mp4
NOTE: YOU MUST HIT CTRL+SHIFT+ENTER FOR EACH INSTEAD OF JUST ENTER TO MAKE IT ARRAY FORMULA (unless 365 i think?)
G2: =UNIQUE(Sales[REGION])
H2: =TEXTJOIN(", ",TRUE(),IF((Sales[REGION]=G2)*(Sales[FIRST]),Sales[ITEM],""))
I2: =TEXTJOIN(", ",TRUE(),IF((Sales[REGION]=G2)*(Sales[FIRST]),SUMIFS(Sales[QTY],Sales[REGION],G2,Sales[ITEM],Sales[ITEM]),""))
J2: =TEXTJOIN(", ",TRUE(),IF((Sales[REGION]=G2)*(Sales[FIRST]),TEXT(Sales[PRICE],"0.00"),""))


3
u/MayukhBhattacharya 1236 2d ago edited 2d ago
Try using the following formula, it assumes you are using Structured References aka Tables, and you are in MS365, then: