Concatenate If

eeehhhyyy

New Member
Joined
May 23, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I created this formula to filter =CONCAT(IF($A:$A=$C2,$B:$B,"")) and if working perfectly.
However i'm having issues with creating a VBA for it.

Basically i want to combine the text in column D based on the reference code in Column C.

Been working on this for hours! any help would be much appreciated
 

Attachments

  • Capture.PNG
    Capture.PNG
    48.5 KB · Views: 22

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi & welcome to MrExcel.
Your description & image do not match up, this is based on the image.
VBA Code:
Sub eeehhhyyy()
   Dim Cl As Range, Rng As Range
   
   Set Rng = Range("A2", Range("A" & rows.Count).End(xlUp))
   For Each Cl In Range("D2", Range("D" & rows.Count).End(xlUp))
      If Cl.Value <> "" Then Cl.Offset(, 1).Value = Evaluate("textjoin("","",,filter(" & Rng.Offset(, 1).Address & "," & Rng.Address & "=""" & Cl.Value & """))")
   Next Cl
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,124
Members
453,021
Latest member
Justyna P

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