Hello,
Here is my code:
Sub Wordpress_CSV_Insert_Formula()
Dim lastRow As Long
lastRow = Range("A" & Rows.Count).End(xlUp).Row
Range("C2").Formula = "=CONCAT(B2, " (", A2, ")" )"
Range("C2").AutoFill Destination:=Range("C2:C" & lastRow)
End Sub
I get an error on the formula line.
Here is my spreadsheet:
I applied the same formula directly to the C2 cell and it correctly returned the formula result. But the macro simply won't run. What am I doing wrong?
Here is my code:
Sub Wordpress_CSV_Insert_Formula()
Dim lastRow As Long
lastRow = Range("A" & Rows.Count).End(xlUp).Row
Range("C2").Formula = "=CONCAT(B2, " (", A2, ")" )"
Range("C2").AutoFill Destination:=Range("C2:C" & lastRow)
End Sub
I get an error on the formula line.
Here is my spreadsheet:
Class ID | Course Title | Calendar Event Name |
06052022_GST_301 | 301 Administration Fundamentals | 301 Administration Fundamentals (06052022_GST_301) |
08102022_CET_401 | 401 Custom MPE Rules Using Regular Expression | |
08122022_CET_402 | 402 Threat Detection with AI Engine |
I applied the same formula directly to the C2 cell and it correctly returned the formula result. But the macro simply won't run. What am I doing wrong?