is there a way to automate a cell to count the number of cells with content and group them all separated by a | symbol?
for example, in the attachment i want the formula in cell AA. i already put the end result i want to see in Cell. i have done this by manually concatenateing all the cells manually but sometimes i get a result like 1|2|3|4|5|6|7||||||||||||||||||||||||||||. my meager result has all the extra |.
5. Drag the formula in AA2:AZ2 down as many rows as you need (to row 4 in your sample file).
What this does is look at each cell in turn (of your original data) and, if there is something in the cell, concatenate that with a | separator before it. The second IF in the formula is there in case your data starts with some blank cells. If the first cell (B2) will never be blank, then you can replace the second IF statement with just " | ", giving you this for in AC2:
You can then hide the helper columns. I've attached your file with this working, but the columns not yet hidden.
Hope that helps.
Regards, Aardigspook
I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
You don't need to give me rep if I helped, but a thank-you is nice.
Without TEXTJOIN, a simple UDF will be easier to work with than a long formula that refers to each cell individually. Note that this, as with Bo_Ry's suggestion above will fail if there are spaces in the original data.
That's one of the great things about Excel - there are often a few different ways of achieving what you want.
If you need more information about one or more of the above, just let us know.
Bookmarks