Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default create defined name using variable file name in reference

please help in create defined name
EXAMPLe:
create name : ACCPath ---- Referes to (='E:\Data Folder\[externa work
book.xlsx]sheet1'!$K$8:$K$10000)
this works

I NEED to put (external work book.xlsx) in a cell and refere to it as
variable in the referes to (='E:\Data Folder\[&U2&]sheet1'!$K$8:$K$10000)
where U2 having the file name because it is changing meny times
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default create defined name using variable file name in reference

Activeworkbook.Names.Add Name:="ACCPath", RefersTo:= "=" &
Activesheet.Range("U2").Value2

---
HTH

Bob Phillips

"hala" wrote in message
...
please help in create defined name
EXAMPLe:
create name : ACCPath ---- Referes to (='E:\Data Folder\[externa work
book.xlsx]sheet1'!$K$8:$K$10000)
this works

I NEED to put (external work book.xlsx) in a cell and refere to it as
variable in the referes to (='E:\Data Folder\[&U2&]sheet1'!$K$8:$K$10000)
where U2 having the file name because it is changing meny times



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default create defined name using variable file name in reference

Hi there.
You may want to try:

Refers to: =''" & CELL("filename") & "sheet'1!$K$8:$K$10000

This name will be a valid name only after the workbook has been saved.

Regards,
Otávio

"hala" wrote:

please help in create defined name
EXAMPLe:
create name : ACCPath ---- Referes to (='E:\Data Folder\[externa work
book.xlsx]sheet1'!$K$8:$K$10000)
this works

I NEED to put (external work book.xlsx) in a cell and refere to it as
variable in the referes to (='E:\Data Folder\[&U2&]sheet1'!$K$8:$K$10000)
where U2 having the file name because it is changing meny times

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default create defined name using variable file name in reference

Just in time (I did not read your post that carefully ...)
You can use the following formula to get the name from another cell:

Refers to: ="'E:\Data Folder\[" & U2 & "]sheet1'!$K$8:$K$10000)

Regards,
Otávio

"Otávio Alves Ribeiro" wrote:

Hi there.
You may want to try:

Refers to: =''" & CELL("filename") & "sheet'1!$K$8:$K$10000

This name will be a valid name only after the workbook has been saved.

Regards,
Otávio

"hala" wrote:

please help in create defined name
EXAMPLe:
create name : ACCPath ---- Referes to (='E:\Data Folder\[externa work
book.xlsx]sheet1'!$K$8:$K$10000)
this works

I NEED to put (external work book.xlsx) in a cell and refere to it as
variable in the referes to (='E:\Data Folder\[&U2&]sheet1'!$K$8:$K$10000)
where U2 having the file name because it is changing meny times

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
Variable file reference Michael Excel Worksheet Functions 2 October 7th 08 06:37 PM
Create an external reference link with embedded variable Greentree Excel Worksheet Functions 1 October 9th 05 07:46 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Making a file and worksheet reference into a variable.... Mr Mike Excel Worksheet Functions 3 July 6th 05 08:52 PM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 10:13 PM


All times are GMT +1. The time now is 08:17 PM.

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

About Us

"It's about Microsoft Excel"