Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through named ranges
Hi
I want to loop through a number of ranges within a workbook. The ranges all start Range and then are range1 and range2 etc I then want to take any links out. I need to leave alone all other named ranges. I am stuck !! Sub TryThisOneAtHome() Sheets("Sheet1").Select For Each IntM In Names If IntM.Name Like "Range*" Then Range(IntM).Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False ActiveSheet.Paste Application.CutCopyMode = False Else End If Next End Sub Help !!! Kind Regards Tim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through named ranges
try this
Sub valueranges() For Each nn In Names If nn.Name Like "range*" Then Range(nn).Value = Range(nn).Value End If Next nn End Sub -- Don Guillett SalesAid Software "Tim" wrote in message om... Hi I want to loop through a number of ranges within a workbook. The ranges all start Range and then are range1 and range2 etc I then want to take any links out. I need to leave alone all other named ranges. I am stuck !! Sub TryThisOneAtHome() Sheets("Sheet1").Select For Each IntM In Names If IntM.Name Like "Range*" Then Range(IntM).Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False ActiveSheet.Paste Application.CutCopyMode = False Else End If Next End Sub Help !!! Kind Regards Tim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LOOPING multiple ranges | Excel Discussion (Misc queries) | |||
Like 123, allow named ranges, and print named ranges | Excel Discussion (Misc queries) | |||
Further Help Req'd - Looping thru cells in named range | Excel Programming | |||
Looping thru cells in a named range | Excel Programming | |||
looping cells though a named range | Excel Programming |