Hi all
I am trying to create an if statement within a copy paste pertaining to a rwo of data, when I add in the "SA" at the end the VBA editor comes up with a "Compile Error: Expected : End of statement: does anyone know how I could get around this?
Code:
'creating document types
FinalRow = Cells(Rows.Count, "C").End(xlUp).Row
Range("B2:B2" & FinalRow).Formula = "=if(C2="""","""","SA")"
Range("B2").Copy Destination:=Range("B2" & FinalRow)
I am trying to create an if statement within a copy paste pertaining to a rwo of data, when I add in the "SA" at the end the VBA editor comes up with a "Compile Error: Expected : End of statement: does anyone know how I could get around this?
Code:
'creating document types
FinalRow = Cells(Rows.Count, "C").End(xlUp).Row
Range("B2:B2" & FinalRow).Formula = "=if(C2="""","""","SA")"
Range("B2").Copy Destination:=Range("B2" & FinalRow)