Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Defining Regions with Names
I have been trying to define certain regions with a name (using the Insert,
Name, Define option of Excel). My problem is that when I run the macro that uses the names, it wants to re-set the area that are named. I need to sort the data in the named regions...does that make sense? Anyone know how to make the names more consistant and not re-set? Thanks. - Elise - |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Defining Regions with Names
Post some of your code..........perhaps someone can help.
Vaya con Dios, Chuck, CABGx3 "Elise148" wrote: I have been trying to define certain regions with a name (using the Insert, Name, Define option of Excel). My problem is that when I run the macro that uses the names, it wants to re-set the area that are named. I need to sort the data in the named regions...does that make sense? Anyone know how to make the names more consistant and not re-set? Thanks. - Elise - |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Defining Regions with Names
This is what's in my code so far...It finds a territory number, copies it and
pastes it to a cell that is found with an Input Box in the the region named "PTI"..."PTI" is the named region that keeps changing Range("A7").Select Cells.Find(What:=InputBox("Enter Territory number you wish to search for.", "Enter Territory Number."), After:=ActiveCell, LookIn:=xlValues, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False).Activate ActiveCell.EntireRow.Select Selection.Cut Cells.Find(What:=InputBox("Enter a territory number of a distributor in the PTI grouping.")).Select Selection.Insert Shift:=xlDown Selection.Sort Key1:=Range("PTI"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("A7").Select End Sub "CLR" wrote: Post some of your code..........perhaps someone can help. Vaya con Dios, Chuck, CABGx3 "Elise148" wrote: I have been trying to define certain regions with a name (using the Insert, Name, Define option of Excel). My problem is that when I run the macro that uses the names, it wants to re-set the area that are named. I need to sort the data in the named regions...does that make sense? Anyone know how to make the names more consistant and not re-set? Thanks. - Elise - |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Defining Regions with Names
Maybe try re-naming the PTI range each time AFTER the copy and paste activity..... something like, ActiveWorkbook.Names.Add Name:="PTI", RefersToR1C1:="=Sheet1!R1C1" hth Vaya con Dios, Chuck, CABGx3 "Elise148" wrote: This is what's in my code so far...It finds a territory number, copies it and pastes it to a cell that is found with an Input Box in the the region named "PTI"..."PTI" is the named region that keeps changing Range("A7").Select Cells.Find(What:=InputBox("Enter Territory number you wish to search for.", "Enter Territory Number."), After:=ActiveCell, LookIn:=xlValues, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False).Activate ActiveCell.EntireRow.Select Selection.Cut Cells.Find(What:=InputBox("Enter a territory number of a distributor in the PTI grouping.")).Select Selection.Insert Shift:=xlDown Selection.Sort Key1:=Range("PTI"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("A7").Select End Sub "CLR" wrote: Post some of your code..........perhaps someone can help. Vaya con Dios, Chuck, CABGx3 "Elise148" wrote: I have been trying to define certain regions with a name (using the Insert, Name, Define option of Excel). My problem is that when I run the macro that uses the names, it wants to re-set the area that are named. I need to sort the data in the named regions...does that make sense? Anyone know how to make the names more consistant and not re-set? Thanks. - Elise - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 defining names (areas) | Excel Worksheet Functions | |||
Defining Names in Excel | Excel Worksheet Functions | |||
Defining identical names that represent different ranges of cells | Excel Discussion (Misc queries) | |||
Locking rows or Regions in Excel worksheets | Excel Worksheet Functions | |||
Defining non worksheet specific names... | Excel Worksheet Functions |