Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry - my mistake - didn't look at the code closely enough.
I should have said this will only work if the range starts in Cell A1. for instance; Sub AAABBBDDD() Range("B9:H30").Name = "YourName" MyName = ThisWorkbook.Names("YourName").RefersToRange.Value MsgBox Cells(UBound(MyName, 1), LBound(MyName, 2)).Address End Sub Returns A22. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... myname().Value would raise an error. An array doesn't have an address property. -- Regards, Tom Ogilvy "papou" <cestpasbonprobin@çanonpluscg44_fr wrote in message ... Hello Steph This will return address of the bottom left cell: MyName = ThisWorkbook.Names("YourName").RefersToRange.Value MsgBox Cells(UBound(MyName, 1), LBound(MyName, 2)).Address HTH Cordially Pascal "Steph" a écrit dans le message de ... Anyone know how to programatically find the bottom left cell of a named range? I need to find that cell, and insert an entire row beneath it. Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom
You're right, unfortunately this does not seem to work for names not starting in A1 Cordially Pascal "Tom Ogilvy" a écrit dans le message de ... sorry - my mistake - didn't look at the code closely enough. I should have said this will only work if the range starts in Cell A1. for instance; Sub AAABBBDDD() Range("B9:H30").Name = "YourName" MyName = ThisWorkbook.Names("YourName").RefersToRange.Value MsgBox Cells(UBound(MyName, 1), LBound(MyName, 2)).Address End Sub Returns A22. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... myname().Value would raise an error. An array doesn't have an address property. -- Regards, Tom Ogilvy "papou" <cestpasbonprobin@çanonpluscg44_fr wrote in message ... Hello Steph This will return address of the bottom left cell: MyName = ThisWorkbook.Names("YourName").RefersToRange.Value MsgBox Cells(UBound(MyName, 1), LBound(MyName, 2)).Address HTH Cordially Pascal "Steph" a écrit dans le message de ... Anyone know how to programatically find the bottom left cell of a named range? I need to find that cell, and insert an entire row beneath it. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
locate a cell value within a range and return its reference | Excel Discussion (Misc queries) | |||
Referencing a named range based upon Range name entry in cell | Excel Worksheet Functions | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
named cell range | Excel Worksheet Functions | |||
Getting a named range from a cell value | Excel Worksheet Functions |