Transferred from one sheet to another sheet

KlausW

Active Member
Joined
Sep 9, 2020
Messages
386
Office Version
  1. 2016
Platform
  1. Windows
Hi Excel helpers

I have a sheet with some member numbers (in column A, from A3 to A18) of an association.
Where those who do not check with X as a participant (in column D, from D3 to D18) will be transferred to Sheet 2 cell U2.
Is it possible for the member numbers to be placed in the same cell separated by a comma in cell U2?
Whit a formel.
All help will be appreciated.

Regards Klaus W
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Array formula:

=TEXTJOIN(", ",TRUE,IF(Sheet1!D3:D18<>"X",Sheet1!A3:A18,""))

Confirm with Ctrl Shift Enter (not just Enter)
 
Upvote 0
As 2016 does not have the TextJoin function, you could do it like
Excel Formula:
=MID(IF(D3<>"X",", "&A3,"")&IF(D4<>"X",", "&A4,"")&IF(D5<>"X",", "&A5,""),3,500)
 
Upvote 0
Solution
Another option would be a UDF
VBA Code:
Function KlausW(RngA As Range, RngB As Range) As String
      
   KlausW = Join(Filter(Evaluate("transpose(if(" & RngB.Address(, , , 1) & "<>""X""," & RngA.Address(, , , 1) & ",""|""))"), "|", False), ", ")
End Function
Used like
Excel Formula:
=KlausW(Sheet1!A3:A18,Sheet1!D3:D18)
 
Upvote 0
As 2016 does not have the TextJoin function, you could do it like
Excel Formula:
=MID(IF(D3<>"X",", "&A3,"")&IF(D4<>"X",", "&A4,"")&IF(D5<>"X",", "&A5,""),3,500)
Thank Fluff just what I neded. KW
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Fluff - ?Application.Version in the immediate pane returns 16.0 for me. And this version includes TEXTJOIN. Is 16.0 different from 2016?
 
Upvote 0
Is 16.0 different from 2016?
Yes everything from 2016 onwards shows 16.0, you need to go to file, account & it will show what your using
1611418181102.png
 
Upvote 0

Forum statistics

Threads
1,215,657
Messages
6,126,062
Members
449,286
Latest member
Lantern

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