Accessing the sheetname in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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
 
You're quite welcome......glad to be of help.........thanks for the
feedback....

Vaya con Dios,
Chuck, CABGx3
 
Back
Top