I have tweaked Fluff's code to use Textjoin a column in vba. Everything works beautifully, except I a getting a "," when there are blank cells. If there is no data, I need for the cells to remain blank.
When I use the formula that provides the desired results directly in the spreadsheet, I get a Run-Time 1004 error
Any suggestions on preventing this would be most appreciated!!
VBA Code:
Sub textjoin()
With Range("AI2:AI" & Range("A" & Rows.Count).End(xlUp).Row)
.Formula = "=TEXTJOIN("","",TRUE,AE2:AH2)"
.Value = .Value
End With
End Sub
When I use the formula that provides the desired results directly in the spreadsheet, I get a Run-Time 1004 error
VBA Code:
Sub textjoin()
With Range("AI2:AI" & Range("A" & Rows.Count).End(xlUp).Row)
.Formula = "=TEXTJOIN("",TRUE,AE2:AH2)"
.Value = .Value
End With
End Sub
Any suggestions on preventing this would be most appreciated!!