PC Review


Reply
Thread Tools Rate Thread

Accessing the sheetname in a cell

 
 
=?Utf-8?B?S2FuYWdhYmFsYW4=?=
Guest
Posts: n/a
 
      27th Feb 2006
I am trying to take the sheetname from a cell to print the content of the
mentioned sheetname in the another cell. the cell id will be same for
different sheet name.

Example: we have four sheets named sheet1, sheet2, sheet3 & sheet4 in the
same workbook. in this sheet1 to sheet3 is having the same template but with
differnt values. I wish to creat the summary of the above one or two or three
sheets in the Sheet4. so I wish to take the sheetname as input from the user
in sheet4 which will help me to access the concerned cells (cell id of
different items are constant for all the templates).

Hope you understood the problem, kindly give me a sollution for this.
 
Reply With Quote
 
 
 
 
R..VENKATARAMAN
Guest
Posts: n/a
 
      27th Feb 2006
suppose B6 of sheet1 has entry
sheet2

if you have a code
Worksheets(Range("B6").Value).Activate
in a macro and run it
it will activate sheet2
you get the hang of it and use it in your macro


"Kanagabalan" <(E-Mail Removed)> wrote in message
news:105A80D1-5966-43F1-824F-(E-Mail Removed)...
>I am trying to take the sheetname from a cell to print the content of the
> mentioned sheetname in the another cell. the cell id will be same for
> different sheet name.
>
> Example: we have four sheets named sheet1, sheet2, sheet3 & sheet4 in the
> same workbook. in this sheet1 to sheet3 is having the same template but
> with
> differnt values. I wish to creat the summary of the above one or two or
> three
> sheets in the Sheet4. so I wish to take the sheetname as input from the
> user
> in sheet4 which will help me to access the concerned cells (cell id of
> different items are constant for all the templates).
>
> Hope you understood the problem, kindly give me a sollution for this.



 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      27th Feb 2006
Assuming the name of the sheet is entered in a cell named "SheetName", the
following will return the contents of cell A1 of that sheet..........

=INDIRECT(SheetName&"!A1")

hth
Vaya con Dios,
Chuck, CABGx3




"Kanagabalan" wrote:

> I am trying to take the sheetname from a cell to print the content of the
> mentioned sheetname in the another cell. the cell id will be same for
> different sheet name.
>
> Example: we have four sheets named sheet1, sheet2, sheet3 & sheet4 in the
> same workbook. in this sheet1 to sheet3 is having the same template but with
> differnt values. I wish to creat the summary of the above one or two or three
> sheets in the Sheet4. so I wish to take the sheetname as input from the user
> in sheet4 which will help me to access the concerned cells (cell id of
> different items are constant for all the templates).
>
> Hope you understood the problem, kindly give me a sollution for this.

 
Reply With Quote
 
=?Utf-8?B?S2FuYWdhYmFsYW4=?=
Guest
Posts: n/a
 
      28th Feb 2006
This is what i exactly needed for my excel programming. Thanks a lot.

GKB
Chennai

"CLR" wrote:

> Assuming the name of the sheet is entered in a cell named "SheetName", the
> following will return the contents of cell A1 of that sheet..........
>
> =INDIRECT(SheetName&"!A1")
>
> hth
> Vaya con Dios,
> Chuck, CABGx3
>
>
>
>
> "Kanagabalan" wrote:
>
> > I am trying to take the sheetname from a cell to print the content of the
> > mentioned sheetname in the another cell. the cell id will be same for
> > different sheet name.
> >
> > Example: we have four sheets named sheet1, sheet2, sheet3 & sheet4 in the
> > same workbook. in this sheet1 to sheet3 is having the same template but with
> > differnt values. I wish to creat the summary of the above one or two or three
> > sheets in the Sheet4. so I wish to take the sheetname as input from the user
> > in sheet4 which will help me to access the concerned cells (cell id of
> > different items are constant for all the templates).
> >
> > Hope you understood the problem, kindly give me a sollution for this.

 
Reply With Quote
 
CLR
Guest
Posts: n/a
 
      28th Feb 2006
You're quite welcome......glad to be of help.........thanks for the
feedback....

Vaya con Dios,
Chuck, CABGx3


"Kanagabalan" <(E-Mail Removed)> wrote in message
news:384881FC-2676-4D32-8885-(E-Mail Removed)...
> This is what i exactly needed for my excel programming. Thanks a lot.
>
> GKB
> Chennai
>
> "CLR" wrote:
>
> > Assuming the name of the sheet is entered in a cell named "SheetName",

the
> > following will return the contents of cell A1 of that sheet..........
> >
> > =INDIRECT(SheetName&"!A1")
> >
> > hth
> > Vaya con Dios,
> > Chuck, CABGx3
> >
> >
> >
> >
> > "Kanagabalan" wrote:
> >
> > > I am trying to take the sheetname from a cell to print the content of

the
> > > mentioned sheetname in the another cell. the cell id will be same for
> > > different sheet name.
> > >
> > > Example: we have four sheets named sheet1, sheet2, sheet3 & sheet4 in

the
> > > same workbook. in this sheet1 to sheet3 is having the same template

but with
> > > differnt values. I wish to creat the summary of the above one or two

or three
> > > sheets in the Sheet4. so I wish to take the sheetname as input from

the user
> > > in sheet4 which will help me to access the concerned cells (cell id of
> > > different items are constant for all the templates).
> > >
> > > Hope you understood the problem, kindly give me a sollution for this.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically update SheetName in workbook sub if SheetName changes RichardRosema@googlemail.com Microsoft Excel Programming 3 29th Feb 2008 04:33 PM
Automatically update SheetName in workbook sub if SheetName changes RichardRosema@googlemail.com Microsoft Excel Misc 3 29th Feb 2008 04:33 PM
Get SheetName from cell =?Utf-8?B?Q0xS?= Microsoft Excel Programming 11 9th Jun 2007 07:27 AM
Sheetname in a cell daniel chen Microsoft Excel Misc 6 21st Nov 2004 07:35 AM
Help getting SheetName into a cell Occupant Microsoft Excel Discussion 8 16th Jan 2004 09:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:46 PM.