Thanks all,

@ STDEV i modified your code and got the desired result. thanks dude. :) your 
code helped me.

@Ashish
so ultimately i have to use replace function. i was thinking there might be 
something so that i dont need to use replace function and i jus can get the 
desired result. thanks for your help and time.




________________________________
From: ashish koul <koul.ash...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Wed, 23 March, 2011 5:52:38 AM
Subject: Re: $$Excel-Macros$$ Find all NamedRanges in Worksheet/workbook


try this


Sub name_rngs()
Dim x As Name
Dim z As String
i = 1
For Each x In ActiveWorkbook.Names
z = ""
Sheets(4).Cells(i, 1) = x.Name
z = Replace(x.RefersTo, "=", "")
Sheets(4).Cells(i, 2) = Replace(z, "$", "")
i = i + 1
Next x


End Sub





 
On Tue, Mar 22, 2011 at 11:02 PM, hanumant shinde <hanumant_5...@yahoo.co.in> 
wrote:

Thanks again. 
>
>@ STDEV 
>sorry but ur code is not working its throwing error for Cells(r, 2) = 
>nm.address(false, false). i dont know if i need to make any change in your 
>code.
>
>@All,
>
>i have just started working on NameRanges so dont have much idea about it.
>I face 1 more problem which is as follows. If namerange is present in Sheet 2 
>and its scope is workbook then i can use F3 and paste list option. but if the 
>scope is for sheet 2 only and if i m working on Sheet 1 then name ranges 
>present 
>in Sheet 2 will not be available in sheet 1. how can i solve this problem.
>
>i want to get all the name ranges in one shot wether it has sheet scope or 
>workbook scope.
>
>
> 
>
>
>
________________________________
From: §»VIPER«§ <viper....@gmail.com>
>To: excel-macros@googlegroups.com
>Sent: Tue, 22 March, 2011 9:46:41 AM 
>
>Subject: Re: $$Excel-Macros$$ Find all NamedRanges in Worksheet/workbook
>
>
>hi hanumant
>
>if your text in A1 as   " =Sheet1!$F$4:$F$7 "
>type the below formula anywhere in the worksheet
>=MID(SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(A1,"$","")),"=","")," 
>",""),2,LEN(TRIM(SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(A1,"$","")),"=","")," 
>","")))-2)
>
>
>-- 
>Thanks & Regards
>
>Thamu
>
>
>
>
>On Tue, Mar 22, 2011 at 3:11 AM, STDEV(i) <setiyowati.d...@gmail.com> wrote:
>
>Dim nm as name, r as long
>>For each nm in thisworkbook.names
>>r = r + 1
>>Cells(r, 1) = nm.Name
>>Cells(r, 2) = nm.address(false, false)
>>Next
>>
>>
>>
>>
>>On 3/18/11, <hanumant_5...@yahoo.co.in> wrote:
>>> Hi friends,
>>>
>>> i want to find out all the namedranges from worksheet / workbook. can
>>> somebody
>>> please help me.
>>>
>>> eg. lets say A1 to A4 name of the range is range1
>>> lets say B1 to B4 name of the range is range2
>>> lets say C1 to C4 name of the range is range3
>>> lets say D1 to D4 name of the range is range4
>>>
>>> NamedRange may have any name and it wil refer to any range. there is no fix 
>>>format.
>>> looking for reply
>>>
>>> --
>>
>>--
>>----------------------------------------------------------------------------------
>>
>>Some important links for excel users:
>>1. Follow us on TWITTER for tips tricks and links : 
>>http://twitter.com/exceldailytip
>>2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>>3. Excel tutorials at http://www.excel-macros.blogspot.com
>>4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>>To post to this group, send email to excel-macros@googlegroups.com
>>
>><><><><><><><><><><><><><><><><><><><><><><>
>>Like our page on facebook , Just follow below link
>>http://www.facebook.com/discussexcel
>>
>
>
>
>
> 
>
>
>-- 
>----------------------------------------------------------------------------------
>
>Some important links for excel users:
>1. Follow us on TWITTER for tips tricks and links : 
>http://twitter.com/exceldailytip
>2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>3. Excel tutorials at http://www.excel-macros.blogspot.com
>4. Learn VBA Macros at http://www.quickvba.blogspot.com
>5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>To post to this group, send email to excel-macros@googlegroups.com
> 
><><><><><><><><><><><><><><><><><><><><><><>
>Like our page on facebook , Just follow below link
>http://www.facebook.com/discussexcel
>
>-- 
>
>----------------------------------------------------------------------------------
>
>Some important links for excel users:
>1. Follow us on TWITTER for tips tricks and links : 
>http://twitter.com/exceldailytip
>2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>3. Excel tutorials at http://www.excel-macros.blogspot.com
>4. Learn VBA Macros at http://www.quickvba.blogspot.com
>5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>To post to this group, send email to excel-macros@googlegroups.com
> 
><><><><><><><><><><><><><><><><><><><><><><>
>Like our page on facebook , Just follow below link
>http://www.facebook.com/discussexcel
>


-- 

Regards
 
Ashish Koul
akoul.blogspot.com
akoul.wordpress.com
My Linkedin Profile
 
PBefore printing, think about the environment. 
-- 
----------------------------------------------------------------------------------

Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to