I'm having some type mismatch errors in my comparison statements. I'm pretty new to VB, so the syntax is rather unfamiliar. Here's the code:
Sub Macro1()
Range("A1"
.Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
For Each Row In Selection
If Columns(1).Value = "254 Project" Then
Columns(3).Cut
ActiveCell.Offset(-3, 0).Range("A1"
.Select
ActiveSheet.Paste
End If
If Columns(1).Value = "DPIC Project" Then
Columns(3).Cut
ActiveCell.Offset(-5, 1).Range("A1"
.Select
ActiveSheet.Paste
End If
Next
End Sub
The fifth line is the one currently giving me problems (If Columns(1).Value...) Any improvements or suggestions are welcome. Thank you.
Sub Macro1()
Range("A1"
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
For Each Row In Selection
If Columns(1).Value = "254 Project" Then
Columns(3).Cut
ActiveCell.Offset(-3, 0).Range("A1"
ActiveSheet.Paste
End If
If Columns(1).Value = "DPIC Project" Then
Columns(3).Cut
ActiveCell.Offset(-5, 1).Range("A1"
ActiveSheet.Paste
End If
Next
End Sub
The fifth line is the one currently giving me problems (If Columns(1).Value...) Any improvements or suggestions are welcome. Thank you.