I'm trying to get an IF statement to work but not sure where I'm going wrong.
I have got a selection copied (in a macro) from sheet1, and the IF statement needs to do something along the lines of.
IF(A2 in sheet2 is empty, than paste selection in A2 of sheet2, otherwise paste in A10 of sheet2)
I started with:
IF(A2=0, (Destination:=Sheet2.Range("A2")), (Destination:=Sheet2.Range("A10"))
But it keeps on throwing up a compile error with the comma just after A2=0
I have got a selection copied (in a macro) from sheet1, and the IF statement needs to do something along the lines of.
IF(A2 in sheet2 is empty, than paste selection in A2 of sheet2, otherwise paste in A10 of sheet2)
I started with:
IF(A2=0, (Destination:=Sheet2.Range("A2")), (Destination:=Sheet2.Range("A10"))
But it keeps on throwing up a compile error with the comma just after A2=0