Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Sheet name, creating dynamically to be used in formula....

Hi,

ENV: Excel 2003 running on Windows XP

[SUMMARY]:

I have a cell carrying varying string literal that may refer to sheet
name. Not getting how to use this literal to use in other cell
formulas to refer to sheet name in <<sheet name!A1212 style.

[IN DETAIL]:

Seemingly simple but I faultered against this one.

I have in cell say B1, the string literal, refering to sheet name.
Lets say current value of literal is "Stocks" which refer to Stocks
sheet in my XLS.

I wish to use elsewhere formula say something like ='Stocks'!A1212.

For specific needs I need to pick sheet name from B1 and form above
formula string dynamically. However, writing formula in a template
alike manner viz: 'B1'!A1212 or B1!A1212 do not work. So basically I
wish to know how do I create sheet name from contents of B1, and use
in formulas such as one above, keeping to original formula template-
alike.

Tried using INDIRECT etc functions and few probes, but did not get
clue.

Thanks for your time, any pointer shall be of much use.

- KA

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Sheet name, creating dynamically to be used in formula....

=INDIRECT(B1&"!A1212")


"Kedar Agarkar" skrev:

Hi,

ENV: Excel 2003 running on Windows XP

[SUMMARY]:

I have a cell carrying varying string literal that may refer to sheet
name. Not getting how to use this literal to use in other cell
formulas to refer to sheet name in <<sheet name!A1212 style.

[IN DETAIL]:

Seemingly simple but I faultered against this one.

I have in cell say B1, the string literal, refering to sheet name.
Lets say current value of literal is "Stocks" which refer to Stocks
sheet in my XLS.

I wish to use elsewhere formula say something like ='Stocks'!A1212.

For specific needs I need to pick sheet name from B1 and form above
formula string dynamically. However, writing formula in a template
alike manner viz: 'B1'!A1212 or B1!A1212 do not work. So basically I
wish to know how do I create sheet name from contents of B1, and use
in formulas such as one above, keeping to original formula template-
alike.

Tried using INDIRECT etc functions and few probes, but did not get
clue.

Thanks for your time, any pointer shall be of much use.

- KA


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sheet name, creating dynamically to be used in formula....

Sometimes, sheet names need to be surrounded by apostrophes.

=INDIRECT("'" & B1 & "'!A1212")

If they aren't needed, this formula won't mind.

excelent wrote:

=INDIRECT(B1&"!A1212")

"Kedar Agarkar" skrev:

Hi,

ENV: Excel 2003 running on Windows XP

[SUMMARY]:

I have a cell carrying varying string literal that may refer to sheet
name. Not getting how to use this literal to use in other cell
formulas to refer to sheet name in <<sheet name!A1212 style.

[IN DETAIL]:

Seemingly simple but I faultered against this one.

I have in cell say B1, the string literal, refering to sheet name.
Lets say current value of literal is "Stocks" which refer to Stocks
sheet in my XLS.

I wish to use elsewhere formula say something like ='Stocks'!A1212.

For specific needs I need to pick sheet name from B1 and form above
formula string dynamically. However, writing formula in a template
alike manner viz: 'B1'!A1212 or B1!A1212 do not work. So basically I
wish to know how do I create sheet name from contents of B1, and use
in formulas such as one above, keeping to original formula template-
alike.

Tried using INDIRECT etc functions and few probes, but did not get
clue.

Thanks for your time, any pointer shall be of much use.

- KA



--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Sheet name, creating dynamically to be used in formula....

Thanks 'excelent' and Dave for your help.

Regards

- KA


On Jan 1, 8:51*pm, Dave Peterson wrote:
Sometimes, sheet names need to be surrounded by apostrophes.

=INDIRECT("'" & B1 & "'!A1212")

If they aren't needed, this formula won't mind.





excelent wrote:

=INDIRECT(B1&"!A1212")


"KedarAgarkar" skrev:


Hi,


ENV:Excel2003 running on Windows XP


[SUMMARY]:


I have a cell carrying varying string literal that may refer to sheet
name. Not getting how to use this literal to use in other cell
formulas to refer to sheet name in <<sheet name!A1212 style.


[IN DETAIL]:


Seemingly simple but I faultered against this one.


I have in cell say B1, the string literal, refering to sheet name.
Lets say current value of literal is "Stocks" which refer to Stocks
sheet in my XLS.


I wish to use elsewhere formula say something like ='Stocks'!A1212.


For specific needs I need to pick sheet name from B1 and form above
formula string dynamically. However, writing formula in a template
alike manner viz: 'B1'!A1212 or B1!A1212 do not work. So basically I
wish to know how do I create sheet name from contents of B1, and use
in formulas such as one above, keeping to original formula template-
alike.


Tried using INDIRECT etc functions and few probes, but did not get
clue.


Thanks for your time, any pointer shall be of much use.


- KA


--

Dave Peterson- Hide quoted text -

- Show quoted text -


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
Dynamically creating a toolbar button Gregory Kip[_2_] Excel Programming 1 March 14th 06 04:44 PM
creating a combobox dynamically on an excel sheet gupt New Users to Excel 8 June 7th 05 04:07 AM
Dynamically create a formula in Sheet B referencing SheetA SHIPP Excel Programming 4 April 17th 05 04:11 PM
dynamically creating check boxes Erin[_5_] Excel Programming 3 November 18th 03 09:52 PM
Dynamically Creating Sheets Todd Huttenstine[_2_] Excel Programming 1 November 3rd 03 03:35 AM


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