Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Designated a cell as a name range
Can I designate the cell that I am is a "named range"? For exmample: Range("A1").Select Cells.Find(What:="Involuntary Termination Count" MatchCase:=True).Select Selection.ClearContents Selection.Offset(1, 0).Select How do I program VBA to name the active cell I am in? (I need to program this way as Involuntary Termination Count keep moving depending on the pivot table report generated. Thanks -- Fastbik ----------------------------------------------------------------------- Fastbike's Profile: http://www.excelforum.com/member.php...fo&userid=2670 View this thread: http://www.excelforum.com/showthread.php?threadid=40031 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Designated a cell as a name range
Without actually selecting any cells:
Dim InvTC As Range Dim myRange As Range With Cells Set InvTC = .Find(What:="Involuntary Termination Count" _ , MatchCase:=True) End With If Not InvTC Is Nothing Then 'checks that Involuntary Ter... was found InvTC.ClearContents Set myRange = InvTC.Offset(1, 0) ActiveWorkbook.Names.Add Name:="myNamedRange", _ RefersTo:="=" & ActiveSheet.Name & "!" & myRange.Address End If Hope this helps Rowan "Fastbike" wrote: Can I designate the cell that I am is a "named range"? For exmample: Range("A1").Select Cells.Find(What:="Involuntary Termination Count", MatchCase:=True).Select Selection.ClearContents Selection.Offset(1, 0).Select How do I program VBA to name the active cell I am in? (I need to program this way as Involuntary Termination Count keeps moving depending on the pivot table report generated. Thanks. -- Fastbike ------------------------------------------------------------------------ Fastbike's Profile: http://www.excelforum.com/member.php...o&userid=26701 View this thread: http://www.excelforum.com/showthread...hreadid=400318 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Designated a cell as a name range
Great, I will try that out. Thanks for the hel -- Fastbik ----------------------------------------------------------------------- Fastbike's Profile: http://www.excelforum.com/member.php...fo&userid=2670 View this thread: http://www.excelforum.com/showthread.php?threadid=40031 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looking up a value next to a designated cell | Excel Discussion (Misc queries) | |||
No printing of b/w designated cell patterns | Excel Discussion (Misc queries) | |||
Excel, function, result to be returned in another designated cell | Excel Worksheet Functions | |||
Text that includes data from a designated cell? | Excel Discussion (Misc queries) | |||
Creating 'yes' or 'no' option in a designated cell | Excel Programming |