Data Table with what I have on left, and what I want to achieve on the right:
I need to be able to concat two cells together if the next cells are empty.
Every cell in column A will be full, but if B2 is empty, I need to put together A1+A2 (removing the 12345 of A2 in the concat.
Note: If B2 is empty, then C2 and D2 will be empty as well.
This also needs to be dynamic, as not only B2 could be empty, but also B3 and B4 which will require the associated A cells to concat together as well.
I'm so sorry, I don't really know where to begin with this. I have attempted If statements and offset function but haven't been able to fully get my understanding around it all.



This can also be accomplished using Power Query, available in Windows Excel 2010+ and Microsoft 365 (Windows or Mac)
To use Power Query
Data => Get&Transform => from Table/RangeHome => Advanced EditorApplied Stepsto understand the algorithmData

M Code
Results
