I have an issue with a VBA script I am writing. I tried Getting Column "I" to return multiple text strings associated with an Object ID number. I am trying to write the TEXTJOIN function on the VBA, but when I do, I get an "@" symbol in my formula bar. It's only for Column I, because I managed to get all my other functions in Column H,J,K,L,M,N to work just fine. However, Column I keeps returning an @ sign right after my "=" (Cell reference = to criteria). This is how I wrote the code:
'Concotenating "x" into the formulas to begin on the 3rd row
x = 3
LCROw2 = LCSheet.Cells(LCSheet.Rows.Count, 2).End(xlUp).Row 'Get new last row of Current
LCSheet.Range(LCSheet.Cells(3, 8), LCSheet.Cells(LCROw2, 8)) = "=IF(ISBLANK(F" & x & "), 99, VLOOKUP(F" & x & ",'Permit Tracker BACKUP'!D:E, 2, 0)) + VLOOKUP(A" & x & ",'Permit Tracker BACKUP'!G:H, 2, 0)"
LCSheet.Range(LCSheet.Cells(3, 9), LCSheet.Cells(LCROw2, 9)) = "=TEXTJOIN("","",TRUE,IF(B" & x & "='WORKORDER REPORT'!A:A,'WORKORDER REPORT'!B:B,""""))"
LCSheet.Range(LCSheet.Cells(3, 10), LCSheet.Cells(LCROw2, 10)) = "=COUNTIF($I$3:I" & x & ",I" & x & "))"
LCSheet.Range(LCSheet.Cells(3, 11), LCSheet.Cells(LCROw2, 11)) = "=COUNTIF($E$3:$E$50000,E" & x & ")"
LCSheet.Range(LCSheet.Cells(3, 12), LCSheet.Cells(LCROw2, 12)) = "=IF(AND(E$3="""",),"""",COUNTIF($E$3:E" & x & ",E" & x & "))"
LCSheet.Range(LCSheet.Cells(3, 13), LCSheet.Cells(LCROw2, 13)) = "=COUNTIF($B$3:$B$50000,B" & x & ")"
LCSheet.Range(LCSheet.Cells(3, 14), LCSheet.Cells(LCROw2, 14)) = "=COUNTIF($B$3:B" & x & ",B" & x & ")"
Then I get this this in my Formula Bar and no data to populate my column: Formula Bar Error
The other columns have the formula written in properly except for Column "I" which has an "@" symbol and it returns this:
=TEXTJOIN(",",TRUE,IF(B3=@'WORK ORDER REPORT'!A:A,'WORK ORDER REPORT'!B:B,""))
When I try to write a .Formula2 before on the VBA code line, Excel Crashes on me.
Any suggestions on how to fix this? Thank you all in advance!