finaljustice
Board Regular
- Joined
- Oct 6, 2010
- Messages
- 175
Hello, I've been trying to select/ copy multiple cells that are not sequenced, such as for example
How do I do this from a activecell reference. Here is my code where I tried doing so with no success.
Thank you before hand for your attention and help.
Your sinecerley,
Final.
Code:
Range("B12,H12,K12,O12").Select
How do I do this from a activecell reference. Here is my code where I tried doing so with no success.
Code:
Do While ActiveCell <> Empty
If ActiveCell.Offset(0, 166).Value = 2011 Then
If ActiveCell.Offset(0, 155).Value > 0 Then 'vantajoso
Range("cell(0,0),cells(0,20),cells(0,24),cells(0,27),cells(0,165),cells(0,168),cells(0,170),cells(0,171)").Copy ' this is where I can't make it
work. Basically what I tried to do was each "CELL()" being displaced in relation to the activecell.
Sheets("2011").Select
Range("B3").PasteSpecial (xlPasteValues)
ActiveCell.Offset(1, 0).Select
Else ' ñ vantajoso
Range("cells(0,0),cells(0,20),cells(0,27),cells(0,165),cells(0,168)").Copy
Sheets("2011").Select
Range("B1048576").End(xlUp).Select
ActiveCell.Offset(1, 0).PasteSpecial (xlPasteValues)
End If
'outros anos
End If
Thank you before hand for your attention and help.
Your sinecerley,
Final.