Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way in VBA to ascertain if a range selection is contiguous. That
is, say I select C3 and D4 on the same page. The Address property for the Selection does not automatically put the address into the form C3:D3 but instead into the form $C$3,$D$3. Is there a way to do this in VBA or do I have to write a function which tests the string for contiguous row or column headers? Sub Macro1() Dim RngAddress As String Range("C3,D3").Select RngAddress = Selection.Address Debug.Print RngAddress End Sub Immediate Window: $C$3,$D$3 Thanks EM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple selections of rows & columns by clicking in one cell | Excel Worksheet Functions | |||
Enabling multiple selections in same cell from dropdown menu | Excel Discussion (Misc queries) | |||
How do I select multiple selections using the range(cell(),Cell()) | Excel Programming | |||
Apply formula to a range with multiple selections | Excel Programming | |||
Creating Multiple GIFs from Multiple Range selections -- I need a volunteer to test my code to see why it fails | Excel Programming |