Help Looking up within a data range and if not blank joining

rrickard

New Member
Joined
Jul 25, 2017
Messages
17
I have a list of Jobs in Column B. If the job has a deduction (any value in column C), then we want the Jobs to be joined together in one cell.

See below where column B and C are the dataset. We want the joined list of Jobs in one single cell.

Note that Column A is missing below. Row 1 is also missing below.

Job (B)Deduction (C)Wrong/Current ResultDesired Result
1231123,456,578,584,364123,578,364
456
5782123,456,578,584,364
584
3645123,456,578,584,364

Wrong/Current Formula is =IF(C3<>"",TEXTJOIN(",",,$B$3,$B$4,$B$5,$B$6,$B$7)," "), but I need it to look at C3 through C7, then join column B where C isn't blank.
 
Last edited:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Does this do what you want?
=IF(C3<>"",TEXTJOIN(",",TRUE,IF($C$3:$C$7<>"",$B$3:$B$7,"")),"")
 
Upvote 0
Does this do what you want?
=IF(C3<>"",TEXTJOIN(",",TRUE,IF($C$3:$C$7<>"",$B$3:$B$7,"")),"")
Almost! It works unless C3 is blank. So if I add data to the blank cells and delete C3 then there's no result at all.

JobDeductionWrong ResultNew Formula with C3
1231123,456,578,584,364123,456,578,584,364
4561123,456,578,584,364
5781123,456,578,584,364
5841123,456,578,584,364
3641123,456,578,584,364

when I remove C3 it goes away
JobDeductionWrong ResultNew Formula with C3 removed
123
4561123,456,578,584,364
5781123,456,578,584,364
5841123,456,578,584,364
3641123,456,578,584,364
 
Upvote 0
Try
=IF(C3:C7<>"",TEXTJOIN(",",TRUE,IF($C$3:$C$7<>"",$B$3:$B$7,"")),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

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