Oh I forgot about that I have to use double quotations. Both of the below is working so thanks! But which of the two should be run the fastest?
With wbmodule.Sheets(ws1)
With .Range("AB2:AB" & .Cells(.Rows.Count, 1).End(xlUp).Row)
.FormulaR1C1 = "=IF(VALUE(RIGHT(RC[-13],2))=1,LEFT(RC[-13],4)-1&""52"",RC[-13]-1)"
.Value = .Value
End With
End With
With wbmodule.Sheets(ws1)
With .Range("AB2:AB" & .Cells(.Rows.Count, 1).End(xlUp).row)
.Formula = "=IF(Right(O2,2)=""01"",CONCATENATE(LEFT(O2,4)-1,52),O2-1)"
.Value = .Value
End With
End With
Bookmarks