Processing non-contiguous row selections
Hi Caméléon,
Try something like:
Sub Tester()
Dim Rng As Range
Dim Ar As Range
Dim cell As Range
Set Rng = _
Range("A1:C1,E1:G1,A4:C4,E4:G4,A7:C7,E7:G7,A10:C10 ,E10:G10")
For Each Ar In Rng.Areas
For Each cell In Ar
MsgBox "Address: " & cell.Address(0, 0) & vbNewLine _
& "Value = " & cell.Value
Next cell
Next Ar
End Sub
--
---
Regards,
Norman
"Caméléon" wrote in message
ups.com...
How do you manage to search through non contiguous... I'm pulling my
hair out on something similar (trying to search the cells in this
order: Range("A1:C1,E1:G1,A4:C4,E4:G4,A7:C7,E7:G7,A10:C10 ,E10:G10" and
so on) . Can you tell me how you do it, I think that could give me a
start
tks
|