Hi guys,
I ve got one very basic question. I type the followig code:
Sub dad()
Dim ar As Range
For Each ar In Range("A1:B3")
If ar > 40 And ar < 200 Then
ar.Interior.Color = vbYellow
ar.Copy
Sheets("sheet2").Range("A1:B3").PasteSpecial
End If
Next ar
End Sub
What it does is to make all relevant numbers from my table in yellow. However, the second step - it just copies one of them and puts it in sheet2. I want to take all numbers between 40 and 200 from my list and paste them in sheet2..Any ideas??
Thanks
I ve got one very basic question. I type the followig code:
Sub dad()
Dim ar As Range
For Each ar In Range("A1:B3")
If ar > 40 And ar < 200 Then
ar.Interior.Color = vbYellow
ar.Copy
Sheets("sheet2").Range("A1:B3").PasteSpecial
End If
Next ar
End Sub
What it does is to make all relevant numbers from my table in yellow. However, the second step - it just copies one of them and puts it in sheet2. I want to take all numbers between 40 and 200 from my list and paste them in sheet2..Any ideas??
Thanks