May 22 2024 07:16 PM - edited May 23 2024 04:26 AM
I am hoping someone can help. I am running out of time and well out of skill.
The attached spreadsheet is a subset of a much larger one. Essentially, the LET statement is very cool (DJClement) and I have modified it to meet the distributed pattern of columns I need to gather.
The current LET formula produces a rows of en_CA, en and fr_CA where the information is duplicated for each of the locale types in as one wide table. I need to get the French columns underneath the equivalent English ones.
The list takes from a source worksheet and generates the output in a new worksheet.
I have tried a few different ways, but have only had limited success.
This is a pic of the current output and the desired state below).
May 22 2024 08:09 PM
May 22 2024 09:22 PM
@NotSoFastEddie Not sure if you saw my reply to your last inquiry found here https://techcommunity.microsoft.com/t5/excel/take-a-series-of-rows-and-break-each-row-into-multiple-... where I used the REDUCE function to iterate through the 3 languages, as opposed to the TOCOL / IF / SEQUENCE method, in order to return different columns for "fr_CA".
If you didn't like that method, please try the newly attached file below, where only the 2 English languages {"en_CA";"en"} are used to repeat the English columns, and the French columns are then stacked below it...
May 23 2024 04:30 AM
May 23 2024 04:31 AM
@peiyezhu Thanks for responding, I replaced the file in the original post and added it to this reply.
May 23 2024 05:10 AM
@NotSoFastEddie Check it again and look closely. I just redownloaded both files (your original and my version) and they are not the same. I made the changes to the formula directly in cell A2, so the "current state" results match the "desired state" that you hard-keyed below. Scroll to the right and you'll see the results only go to column U in my file, whereas the original file goes all the way to column AM. Compare the files side-by-side and the differences will be obvious.
May 23 2024 09:06 AM
@djclements Thanks again. Merged it into the big spreadsheet and it works beautifully. At least I was on the right path with what I was attempting, just getting some weird results.
That wraps it up for this spreadsheet. Want to thank you for all your help - could not have done it without you.
May 23 2024 10:02 AM
You appear to be sorted but, just for the record, I appeared to be making some progress by searching the header row for English and French data fields.
= LET(
enColIdx, XMATCH(desiredHdr, header),
frenchIdx, XMATCH(desiredHdr & " FR", header),
frColIdx, IFERROR(frenchIdx, enColIdx),
rowIdx, SEQUENCE(ROWS(body)),
stacked, VSTACK(INDEX(body,rowIdx,enColIdx), INDEX(body,rowIdx,frColIdx)),
FILTER(stacked, TAKE(stacked,,1)<>"")
)
May 23 2024 12:25 PM
Solution@PeterBartholomew1 - thanks for taking time to look at. I am good - finally - so many people happy now - but me more than any of them. I need to go back to my solution architect role.....
May 23 2024 12:25 PM
Solution@PeterBartholomew1 - thanks for taking time to look at. I am good - finally - so many people happy now - but me more than any of them. I need to go back to my solution architect role.....