Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Can I use a worksheet name in a formula?

I'm using Office 2007
I have a workbook with 20+ pages. On one of them I want to use a formula
that refers to a worksheet name, but in different cells I want it to refer
to different worksheets.

I have a cell that currently has a name typed into it that matches a
worksheet name. Can I refer to the contents of that cell (INDIRECT) and use
the content to refer to the correct worksheet and then go to that worksheet
for the data?

eg. Sheet called Christmas. In cell H2 value = Pudding
on another sheet cell B2 value = Christmas. I want the formula in cell J12
to go to Sheet Christmas and give value of cell H2

Thanks
Chris

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,533
Default Can I use a worksheet name in a formula?

Hi Chris

This will get the value in cell H2 of the sheet specified in B2:

=INDIRECT(B2&"!H2")

Regards,
Per

"Chris" skrev i meddelelsen
...
I'm using Office 2007
I have a workbook with 20+ pages. On one of them I want to use a formula
that refers to a worksheet name, but in different cells I want it to refer
to different worksheets.

I have a cell that currently has a name typed into it that matches a
worksheet name. Can I refer to the contents of that cell (INDIRECT) and
use the content to refer to the correct worksheet and then go to that
worksheet for the data?

eg. Sheet called Christmas. In cell H2 value = Pudding
on another sheet cell B2 value = Christmas. I want the formula in cell J12
to go to Sheet Christmas and give value of cell H2

Thanks
Chris


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Can I use a worksheet name in a formula?

Thanks - I tried this before I posted and thought I was wrong because it
returned the #REF error. I checked the formatting of the cell B2 and it was
General, didn't work when I changed it to Text.

"Per Jessen" wrote in message
...
Hi Chris

This will get the value in cell H2 of the sheet specified in B2:

=INDIRECT(B2&"!H2")

Regards,
Per

"Chris" skrev i meddelelsen
...
I'm using Office 2007
I have a workbook with 20+ pages. On one of them I want to use a formula
that refers to a worksheet name, but in different cells I want it to
refer to different worksheets.

I have a cell that currently has a name typed into it that matches a
worksheet name. Can I refer to the contents of that cell (INDIRECT) and
use the content to refer to the correct worksheet and then go to that
worksheet for the data?

eg. Sheet called Christmas. In cell H2 value = Pudding
on another sheet cell B2 value = Christmas. I want the formula in cell
J12 to go to Sheet Christmas and give value of cell H2

Thanks
Chris



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Can I use a worksheet name in a formula?

If you've got spaces in the worksheet name, it needs single quotes around
it, as shown in anther branch of this thread.
--
David Biddulph

"Chris" wrote in message
...
Thanks - I tried this before I posted and thought I was wrong because it
returned the #REF error. I checked the formatting of the cell B2 and it
was General, didn't work when I changed it to Text.

"Per Jessen" wrote in message
...
Hi Chris

This will get the value in cell H2 of the sheet specified in B2:

=INDIRECT(B2&"!H2")

Regards,
Per

"Chris" skrev i meddelelsen
...
I'm using Office 2007
I have a workbook with 20+ pages. On one of them I want to use a formula
that refers to a worksheet name, but in different cells I want it to
refer to different worksheets.

I have a cell that currently has a name typed into it that matches a
worksheet name. Can I refer to the contents of that cell (INDIRECT) and
use the content to refer to the correct worksheet and then go to that
worksheet for the data?

eg. Sheet called Christmas. In cell H2 value = Pudding
on another sheet cell B2 value = Christmas. I want the formula in cell
J12 to go to Sheet Christmas and give value of cell H2

Thanks
Chris





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Can I use a worksheet name in a formula?

Try:

=INDIRECT(B2 & "!" & "H2")


--
Gary''s Student - gsnu200909


"Chris" wrote:

I'm using Office 2007
I have a workbook with 20+ pages. On one of them I want to use a formula
that refers to a worksheet name, but in different cells I want it to refer
to different worksheets.

I have a cell that currently has a name typed into it that matches a
worksheet name. Can I refer to the contents of that cell (INDIRECT) and use
the content to refer to the correct worksheet and then go to that worksheet
for the data?

eg. Sheet called Christmas. In cell H2 value = Pudding
on another sheet cell B2 value = Christmas. I want the formula in cell J12
to go to Sheet Christmas and give value of cell H2

Thanks
Chris

.



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
Worksheet formula incorrect after copying to another worksheet Karen Excel Worksheet Functions 2 November 12th 09 01:06 AM
using worksheet name in a formula but not current worksheet Sing Chung Excel Worksheet Functions 3 July 23rd 09 04:29 PM
Formula for advance worksheet name to next worksheet name David Frank Excel Worksheet Functions 2 February 9th 08 07:51 PM
Copying a formula from one worksheet to another worksheet Kathie Excel Worksheet Functions 1 May 24th 07 01:31 PM
How do I take a cell in one worksheet and add it into the formula in a different worksheet in the same workbook? Lexi Excel Worksheet Functions 3 September 20th 06 05:52 PM


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