Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default range name question


i'll simplify a little here. i have a separate workbook with rates and some
named ranges. let's say one is Joe_Tier1 and another is Bob_Tier1.

then bob and joe have separate workbooks.

if i have their name in A1. how would i write a formula to replace "Joe" wit the
value in A1?

Rates.xls!Joe_Tier1*G58




--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default range name question

right now i'm building the formula on a worksheet open event. i can do it in vb,
just can't figure it out with a cell formula

--


Gary


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

i'll simplify a little here. i have a separate workbook with rates and some
named ranges. let's say one is Joe_Tier1 and another is Bob_Tier1.

then bob and joe have separate workbooks.

if i have their name in A1. how would i write a formula to replace "Joe" wit
the value in A1?

Rates.xls!Joe_Tier1*G58




--


Gary





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default range name question

Let's say that Joe_Tier1 referred to B2:C3 and that cell A1 contains frank

running:

Sub Macro1()
Dim s As String
Dim s2 As String
s = Cells(1, 1).Value
s2 = Replace("Joe_Tier1", "Joe", s)
ActiveWorkbook.Names.Add Name:=s2, RefersToR1C1:= _
"=Sheet1!R2C2:R3C3"
End Sub

will create a new range named frank_Tier1 that also covers B2:C3. You can
delete the old name manually or by a :

ActiveWorkbook.Names("Joe_Tier1").Delete
--
Gary's Student


"Gary Keramidas" wrote:


i'll simplify a little here. i have a separate workbook with rates and some
named ranges. let's say one is Joe_Tier1 and another is Bob_Tier1.

then bob and joe have separate workbooks.

if i have their name in A1. how would i write a formula to replace "Joe" wit the
value in A1?

Rates.xls!Joe_Tier1*G58




--


Gary




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default range name question

Do you just mean

=INDIRECT("Rates.xls!"&A1&"_Tier1")*g58

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

i'll simplify a little here. i have a separate workbook with rates and

some
named ranges. let's say one is Joe_Tier1 and another is Bob_Tier1.

then bob and joe have separate workbooks.

if i have their name in A1. how would i write a formula to replace "Joe"

wit the
value in A1?

Rates.xls!Joe_Tier1*G58




--


Gary





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default range name question

yes, bob, exactly. i was trying the indirect between the &&'s

thanks

--


Gary


"Bob Phillips" wrote in message
...
Do you just mean

=INDIRECT("Rates.xls!"&A1&"_Tier1")*g58

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

i'll simplify a little here. i have a separate workbook with rates and

some
named ranges. let's say one is Joe_Tier1 and another is Bob_Tier1.

then bob and joe have separate workbooks.

if i have their name in A1. how would i write a formula to replace "Joe"

wit the
value in A1?

Rates.xls!Joe_Tier1*G58




--


Gary









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range question in '97 Adam Kroger Excel Discussion (Misc queries) 10 December 12th 05 03:44 AM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM
Range question mnewnam[_2_] Excel Programming 0 October 28th 04 07:28 PM
Range question Lee dengo Excel Programming 2 May 25th 04 09:41 PM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"