I have the following code to copy column E from Sheet 1 to Column G of Sheet 2.
I only want to copy the cells in column E if Column C = A
Sub Copycol()
Sheets("Sheet1").Select
Sheet2.Activate
If Range("c1:c7").Cells.Value = "A" Then
Range("e1:e7").Copy
Sheets("Sheet2").Select
Range("G3:G10").Select
ActiveSheet.Paste
End If
End Sub
Type missmatch error on the If line.
Thanks!!!
I only want to copy the cells in column E if Column C = A
Sub Copycol()
Sheets("Sheet1").Select
Sheet2.Activate
If Range("c1:c7").Cells.Value = "A" Then
Range("e1:e7").Copy
Sheets("Sheet2").Select
Range("G3:G10").Select
ActiveSheet.Paste
End If
End Sub
Type missmatch error on the If line.
Thanks!!!