J
Jbm
In VBA my macro is this:
Sub test2()
RowCount = 1
For Each c In Range("G:G")
If c.Value = "P1.Value" Then
Cells(RowCount, "R").Value = c.Value
Cells(RowCount, "S").Value = c.Offset(0, 1).Value
Cells(RowCount, "T").Value = c.Offset(0, 2).Value
Cells(RowCount, "U").Value = c.Offset(0, 3).Value
Cells(RowCount, "V").Value = c.Offset(0, 4).Value
RowCount = RowCount + 1
End If
Next
End Sub
The part that does not seem to work is the line
'If c.Value = "P1.Value" Then'
I've tried many different variations to try to get c.Value to check against
the value of P1 (which is a date, 07/27/09). How do I get the if statement
to check for a match to P1?
Sub test2()
RowCount = 1
For Each c In Range("G:G")
If c.Value = "P1.Value" Then
Cells(RowCount, "R").Value = c.Value
Cells(RowCount, "S").Value = c.Offset(0, 1).Value
Cells(RowCount, "T").Value = c.Offset(0, 2).Value
Cells(RowCount, "U").Value = c.Offset(0, 3).Value
Cells(RowCount, "V").Value = c.Offset(0, 4).Value
RowCount = RowCount + 1
End If
Next
End Sub
The part that does not seem to work is the line
'If c.Value = "P1.Value" Then'
I've tried many different variations to try to get c.Value to check against
the value of P1 (which is a date, 07/27/09). How do I get the if statement
to check for a match to P1?