Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting row indexes on Range
(I refer to C# code, but answers in VB are welcome)
I have a Range in Excel, which includes several cells (the cells the user selected in the Excel sheet). The range might include the following cells A2, B7, G4. This means that the cells might not be connected. If I look at myRange.Cells.Count, it will return 3. If I look at myRange.Row, it will return 2 (if A2 was the first selected row by the user). Now, I need to get the row numbers of all selected rows, so in the above range, I need an int[] of {2, 7, 4}. But I can't see any solution to go through the Cells and get the row index for the individual cell. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a range that indexes in a For loop | Excel Programming | |||
Vlookup using concatenated column indexes | Excel Worksheet Functions | |||
Obtain current RGB settings for color indexes 17 thru 27 | Excel Programming | |||
multiple chart indexes | Excel Programming | |||
Figuring out what the Shape Indexes are. | Excel Programming |