Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Contents of a cell refer to sheet name

Hello there

I would like to do something like this:

in sheet1 the value of cell A1="sheet2"
in sheet1 the formula in cell B1 should be something like:

='A1!'C5

so that it will look in sheet2 because that's the value in A1.

Doesn't work, does it?

Thanks

Peter

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Contents of a cell refer to sheet name

Hi
try in cell B1
=INDIRECT("'" & A1 & "'!C5")

--
Regards
Frank Kabel
Frankfurt, Germany


Audio_freak wrote:
Hello there

I would like to do something like this:

in sheet1 the value of cell A1="sheet2"
in sheet1 the formula in cell B1 should be something like:

='A1!'C5

so that it will look in sheet2 because that's the value in A1.

Doesn't work, does it?

Thanks

Peter

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Contents of a cell refer to sheet name

=Indirect("'" & A1 & "'!C5")


the single quote is to the left of the exclamation point.

--
Regards,
Tom Ogilvy

"Audio_freak" wrote in message
. 2.2...
Hello there

I would like to do something like this:

in sheet1 the value of cell A1="sheet2"
in sheet1 the formula in cell B1 should be something like:

='A1!'C5

so that it will look in sheet2 because that's the value in A1.

Doesn't work, does it?

Thanks

Peter



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Contents of a cell refer to sheet name

"Tom Ogilvy" wrote in
:

Indirect("'" & A1 & "'!C5")




That works fellows. Thanks very much!

P
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
Use cell contents to refer to a sheetname in a formula cp Excel Worksheet Functions 6 September 29th 08 06:56 PM
Refer to a worksheet/name using cell contents? Caeres Excel Worksheet Functions 5 September 23rd 08 03:23 AM
Refer to a sheet using a cell value bony_tony Excel Worksheet Functions 2 July 11th 08 04:27 PM
Refer to sheet name specified in other cell Marko Pinteric Excel Discussion (Misc queries) 2 March 4th 05 09:13 AM
Using contents of cell to refer to a worksheet Mike[_50_] Excel Programming 3 September 24th 03 01:03 AM


All times are GMT +1. The time now is 08:20 AM.

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"