Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to loop through the ranges in my workbook and set a string to
the values of the first two cells in each range. I can access the Names collection and get the name as Sheet and Cell identifiers (Sheet1!$A$1:$A$4), and I can use the .Name property to get the name I gave the range. But I can't seem to get the range itself to get the values from the Cells(1,1) and Cells(1,2). Ed Set wb = ActiveWorkbook On Error Resume Next For Each rngName In wb.Names rngName.RefersToRange.Select strRng = rngName.Name rngWork = ActiveWorkbook.Range(rngName.Name) strOptn = rngWork.Cells(1, 1).Value strOptn = strOptn & " Size " & rngWork.Cells(1, 2).Value MsgBox strOptn Next rngName On Error GoTo 0 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Named Range that uses "relative" range - Possible? | Excel Worksheet Functions | |||
combining values and text to make a reference for "named range" | Excel Worksheet Functions | |||
Array as a "named range" - formula ok in cells, but error as "named range" | Excel Discussion (Misc queries) | |||
Modify "pick from list" to read named range | Excel Programming | |||
Adding named range gives error "method range of object _Global failed " | Excel Programming |