Textjoin records

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,364
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I'm using =TEXTJOIN(", ",TRUE,IF(A5:A11=4,F5:F11,"")) which works fine, but I would have to now transfer this down the spreadsheet to the next cell and then the formula would be =TEXTJOIN(", ",TRUE,IF(A13:A17=4,F13:F17,""))

I'm working with a Work Breakdown Structure and need to join all of the level 4 values.

In column A I have the WBS levels (1, 2, 3, 4). After every level 3, I need to textjoin all of the level 4's until the next level 3.

Sorry, I would post this data using the XLBB tool, but can't access it on this computer.

Can this be done with a formula or will it require VBA? I'm fine either way.
 

Attachments

  • Picture1.png
    Picture1.png
    13.6 KB · Views: 9

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I'm using =TEXTJOIN(", ",TRUE,IF(A5:A11=4,F5:F11,"")) which works fine, but I would have to now transfer this down the spreadsheet to the next cell and then the formula would be =TEXTJOIN(", ",TRUE,IF(A13:A17=4,F13:F17,""))

I'm working with a Work Breakdown Structure and need to join all of the level 4 values.

In column A I have the WBS levels (1, 2, 3, 4). After every level 3, I need to textjoin all of the level 4's until the next level 3.

Sorry, I would post this data using the XLBB tool, but can't access it on this computer.

Can this be done with a formula or will it require VBA? I'm fine either way.
I'm not sure if this will work for you.

I would hide column F and have a new column G to contain a formula.

I have changed the task name to the cell address so that you see that it is pulling in the right data.

Textjoin records.xlsx
ABCDEFG
1LevelWBSWork CentreCellFunctionsTaskTask
211First Line
321.1Second Line
431.1.1Third Line$F$5, $F$6, $F$7, $F$8, $F$9, $F$10, $F$11
541.1.1.1$F$5$F$5
641.1.1.2$F$6$F$6
741.1.1.3$F$7$F$7
841.1.1.4$F$8$F$8
941.1.1.5$F$9$F$9
1041.1.1.6$F$10$F$10
1141.1.1.7$F$11$F$11
1231.1.2Third Line$F$13, $F$14, $F$15, $F$16, $F$17
1341.1.2.1$F$13$F$13
1441.1.2.2$F$14$F$14
1541.1.2.3$F$15$F$15
1641.1.2.4$F$16$F$16
1741.1.2.5$F$17$F$17
1831.1.3Third Line$F$19, $F$20, $F$21, $F$22
1941.1.3.1$F$19$F$19
2041.1.3.2$F$20$F$20
2141.1.3.3$F$21$F$21
2241.1.3.4$F$22$F$22
Sheet1
Cell Formulas
RangeFormula
F5:F11,F19:F22,F13:F17F5=ADDRESS(ROW(),COLUMN())
G4:G22G4=IF($A4=3,TEXTJOIN(", ",TRUE,INDIRECT("$F" & ROW() & ":$F" & ROW()+COUNTIFS($B4:$B22,$B4 & "*",$A4:$A22,4))),$F4)
 
Upvote 0
Solution
This works great for my needs. Thank you.
I'm glad that it works for you. You just need to change the ranges it refers to. I wanted to avoid using VBA.

If you can use XL2BB when posting data it wil save people having to type it out.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Alternatively, just cut and paste it into the message.
 
Upvote 0

Forum statistics

Threads
1,215,165
Messages
6,123,391
Members
449,098
Latest member
ArturS75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top