Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Inserting a string in a cell reference

down vote favorite
share [g+] share [fb] share [tw]


Dear All,

I have in a cell ("I8") the name of the sheet and I in another cell I want to get the value of a cell that is located in a different workbook but has the same name. So I've tried:

='[Results.xlsx]'&I8&'!$P$2

but I get an error. I've tried using " but I also get an error. I've done this already but I haven't got the excel file with me. Any advise is welcome.

Kind regards,

Joćo
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default Inserting a string in a cell reference

hi Joćo,

the INDIRECT function will work if the file " Results.xlsx" is open

=INDIRECT("'[Results.xlsx]"&I8&"'!$P$2")

if not you can use a vba solution

--
isabelle




Le 2012-04-06 20:34, Joao Andre a écrit :
down vote favorite
share [g+] share [fb] share [tw]


Dear All,

I have in a cell ("I8") the name of the sheet and I in another cell I
want to get the value of a cell that is located in a different workbook
but has the same name. So I've tried:

='[Results.xlsx]'&I8&'!$P$2

but I get an error. I've tried using " but I also get an error. I've
done this already but I haven't got the excel file with me. Any advise
is welcome.

Kind regards,

Joćo




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default Inserting a string in a cell reference

On Friday, April 6, 2012 7:34:33 PM UTC-5, Joao Andre wrote:
down vote favorite
share [g+] share [fb] share [tw]


Dear All,

I have in a cell ("I8") the name of the sheet and I in another cell I
want to get the value of a cell that is located in a different workbook
but has the same name. So I've tried:

='[Results.xlsx]'&I8&'!$P$2

but I get an error. I've tried using " but I also get an error. I've
done this already but I haven't got the excel file with me. Any advise
is welcome.

Kind regards,

Joćo




--
Joao Andre

If the source wb is closed you may just use the formula referencing the sheet. Then you could use editreplaceoldsheetname with newsheetname

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
SQL string-how to reference cell/range SherryBerry Excel Programming 1 October 23rd 07 07:58 PM
String with Cell Reference LarryP Excel Programming 2 July 23rd 07 09:20 PM
freeze cell reference when inserting a row Rod Excel Discussion (Misc queries) 6 August 30th 06 06:42 PM
reference to a cell within a string susan hayes Excel Programming 3 September 29th 04 10:46 AM
inserting a formula with reference to a new sheet in a cell using VBA Peer Excel Programming 2 July 26th 04 03:17 PM


All times are GMT +1. The time now is 02:43 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"