Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to determine the name of the range for the active cell on a worksheet.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if the name refers to that single cell alone
msgbox activecell.name.name if it could be part of a larger named range for each nm in ThisWorkbook.Names set rng = Nothing on Error Resume Next set rng = nm.RefersToRange On error goto 0 if not rng is nothing then if rng.Parent.name = activeCell.parent.Name then set rng1 = Intersect(rng,ActiveCell) if not rng1 is nothing them msgbox nm.Name exit for end if end if End if Next -- Regards, Tom Ogilvy "Len" wrote in message ... I need to determine the name of the range for the active cell on a worksheet. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Now that I have the name, how do I refer to that range? For example, if I
want to clear the range. "Tom Ogilvy" wrote: if the name refers to that single cell alone msgbox activecell.name.name if it could be part of a larger named range for each nm in ThisWorkbook.Names set rng = Nothing on Error Resume Next set rng = nm.RefersToRange On error goto 0 if not rng is nothing then if rng.Parent.name = activeCell.parent.Name then set rng1 = Intersect(rng,ActiveCell) if not rng1 is nothing them msgbox nm.Name exit for end if end if End if Next -- Regards, Tom Ogilvy "Len" wrote in message ... I need to determine the name of the range for the active cell on a worksheet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find address of active cell | Excel Worksheet Functions | |||
copy active cell value,find the pasted value in different worksheet | Excel Worksheet Functions | |||
find text in a cell and make cell 2 cells below that active | Excel Programming | |||
how do find out the column of the active cell in a macro? | Excel Programming | |||
Find active cell | Excel Programming |