Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt Lawson
 
Posts: n/a
Default Cell reference - for the sheet name, can I use a variable?

For example, I know I can refer to another worksheet in a cell formula as such:
=Data!C6

However, Is there a way to refer to the name of the sheet based on the name
of the sheet being a variable (ie. the contents of another cell?)

THanks

Matt Lawson


  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
=INDIRECT("'" & A1 & "'!C6)
where A1 stores your sheet name

"Matt Lawson" wrote:

For example, I know I can refer to another worksheet in a cell formula as such:
=Data!C6

However, Is there a way to refer to the name of the sheet based on the name
of the sheet being a variable (ie. the contents of another cell?)

THanks

Matt Lawson


  #3   Report Post  
Matt Lawson
 
Posts: n/a
Default

Thanks again for the help Frank!

I get a "formula you typed contains an error".. I did replace A1 with the
correct cell. I looked up the reference in help, and I'm not sure how you are
using the INDIRECT function.

Thanks

Matt Lawson

"Frank Kabel" wrote:

Hi
=INDIRECT("'" & A1 & "'!C6)
where A1 stores your sheet name

"Matt Lawson" wrote:

For example, I know I can refer to another worksheet in a cell formula as such:
=Data!C6

However, Is there a way to refer to the name of the sheet based on the name
of the sheet being a variable (ie. the contents of another cell?)

THanks

Matt Lawson


  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Matt,

It should be

=INDIRECT("'" & A1 & "'!C6")

not the single quotes as well as the doubles.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Matt Lawson" wrote in message
...
Thanks again for the help Frank!

I get a "formula you typed contains an error".. I did replace A1 with the
correct cell. I looked up the reference in help, and I'm not sure how you

are
using the INDIRECT function.

Thanks

Matt Lawson

"Frank Kabel" wrote:

Hi
=INDIRECT("'" & A1 & "'!C6)
where A1 stores your sheet name

"Matt Lawson" wrote:

For example, I know I can refer to another worksheet in a cell formula

as such:
=Data!C6

However, Is there a way to refer to the name of the sheet based on the

name
of the sheet being a variable (ie. the contents of another cell?)

THanks

Matt Lawson




  #5   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi Bob
thanks for the correction :-)


"Bob Phillips" wrote:

Matt,

It should be

=INDIRECT("'" & A1 & "'!C6")

not the single quotes as well as the doubles.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Matt Lawson" wrote in message
...
Thanks again for the help Frank!

I get a "formula you typed contains an error".. I did replace A1 with the
correct cell. I looked up the reference in help, and I'm not sure how you

are
using the INDIRECT function.

Thanks

Matt Lawson

"Frank Kabel" wrote:

Hi
=INDIRECT("'" & A1 & "'!C6)
where A1 stores your sheet name

"Matt Lawson" wrote:

For example, I know I can refer to another worksheet in a cell formula

as such:
=Data!C6

However, Is there a way to refer to the name of the sheet based on the

name
of the sheet being a variable (ie. the contents of another cell?)

THanks

Matt Lawson





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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
how to cell reference a Chart title Rasoul Khoshravan Azar Charts and Charting in Excel 2 January 1st 05 05:00 PM
Using a formula in a Hyperlink Cell reference sslabbe Excel Discussion (Misc queries) 4 December 10th 04 12:30 AM
Displaying sheet and cell value in another cell M. Beall Excel Discussion (Misc queries) 1 December 9th 04 07:35 AM
Cell Colors and Sheet Protection cincode5 Excel Discussion (Misc queries) 1 December 3rd 04 10:39 PM


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