Aug 15, 2002 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 How can I do , in VBA, same operations on multiples selections (cells selected with CTRL )?
Aug 15, 2002 #2 kevinclark Programmer Joined May 20, 2001 Messages 285 Location CA Are you looking for something like this ? Sub Sample() For Each Cell In Selection Cell.Value = "HELLO" Next Cell End Sub Upvote 0 Downvote
Are you looking for something like this ? Sub Sample() For Each Cell In Selection Cell.Value = "HELLO" Next Cell End Sub
Aug 15, 2002 #3 acron MIS Joined Oct 19, 2001 Messages 476 Location IE You can use something like Range("A1:A5,B6:B10,C11:C15".Select, which selects 3 non-contiguous areas, or do it with the Union operator as follows, Code: Dim oSelect As Range Set oSelect = Union([A1:A5], [B6:B10], [C11:c15]) oSelect.Select A.C. Upvote 0 Downvote
You can use something like Range("A1:A5,B6:B10,C11:C15".Select, which selects 3 non-contiguous areas, or do it with the Union operator as follows, Code: Dim oSelect As Range Set oSelect = Union([A1:A5], [B6:B10], [C11:c15]) oSelect.Select A.C.