I have a below formula which works in excel, in a cell.
="D"&AC2 & REPT(" ",12 - LEN(AC2))&REPT(" ", 20)&T2&REPT(" ", 3 - LEN(T2))&AD2&REPT(" ", 2 - LEN(AD2))&REPT(" ",12)
I tried to translate this to VBA, For letter D
and all the whitespaces " "
I used escape characters (i thought, they are escape characters) """" """"
but I couldn't get it to work.
Here's the formula I tried in VBA
"= """"D""""&AC2 & REPT("""" """" ,12 - LEN(AC2))&REPT("""" """", 20)&T2&REPT("""" """" , 3 - LEN(T2))&AD2&REPT("""" """" , 2 - LEN(AD2))&REPT("""" """" ,12)"
Any help is appreciated. Thanks