Plastik808
New Member
- Joined
- Aug 15, 2011
- Messages
- 11
Hi,
As you will probably gather from my simple questiom, I am new to VBA and am trying to copy certain values (less than 5) in a certain range to another column in the worksheet. Column A has a list of different numbers and i am trying to copy on those numbers less than 5 and place them in C
Private Sub CommandButton1_Click()
Dim example As Integer, i As Integer
example = 0
For i = 1 To 99
If Cells(i, 1).Value <5 Then Copy
Next i
Range("C1").Value.Paste
End Sub
What am i doing wrong please?
Thanks
As you will probably gather from my simple questiom, I am new to VBA and am trying to copy certain values (less than 5) in a certain range to another column in the worksheet. Column A has a list of different numbers and i am trying to copy on those numbers less than 5 and place them in C
Private Sub CommandButton1_Click()
Dim example As Integer, i As Integer
example = 0
For i = 1 To 99
If Cells(i, 1).Value <5 Then Copy
Next i
Range("C1").Value.Paste
End Sub
What am i doing wrong please?
Thanks