Hi,
I want to put an excel formula in cell I2 and drag it down to last used row. When i put it into a VBA module my .formula code goes red and cannot figure out why. The excel formula is definatly correct as I use it manually. VBA seems like it doesn't like the ( or "" in the logic. Any ideas?
I want to put an excel formula in cell I2 and drag it down to last used row. When i put it into a VBA module my .formula code goes red and cannot figure out why. The excel formula is definatly correct as I use it manually. VBA seems like it doesn't like the ( or "" in the logic. Any ideas?
VBA Code:
ws.Range("I2").Formula = "=MID(E2,FIND("(",E2)+1,FIND(")",E2)-FIND("(",E2)-1)"
ws.Range("I2").AutoFill Destination:=Range("I2:I" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillDefault