ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   function to use sheet's name as variable (https://www.excelbanter.com/excel-worksheet-functions/129839-function-use-sheets-name-variable.html)

tibby

function to use sheet's name as variable
 
Hi,

I have a worksheet with contracts. For each contract I have a sheet which
has as name the client's code. There are lots of sheets. In each sheet the
structure is the same, so, for example in cell D9 in every sheet you'll find
the same info regarding that client
In another sheet, I want to put in a cell the client's code and to extract
the info I want from the client's sheet. So I want to use the sheet's name as
variable.
Is there a way I can do that with a function ?

Thx

JE McGimpsey

function to use sheet's name as variable
 
One way:

A1: <client code

D1: =INDIRECT("'" & A1 & "'!D9")

In article ,
tibby wrote:

Hi,

I have a worksheet with contracts. For each contract I have a sheet which
has as name the client's code. There are lots of sheets. In each sheet the
structure is the same, so, for example in cell D9 in every sheet you'll find
the same info regarding that client
In another sheet, I want to put in a cell the client's code and to extract
the info I want from the client's sheet. So I want to use the sheet's name as
variable.
Is there a way I can do that with a function ?

Thx


Mike

function to use sheet's name as variable
 
=MID(CELL("filename"),(FIND("]",CELL("filename"))+1),50)

This will extract the name of the sheet.

"tibby" wrote:

Hi,

I have a worksheet with contracts. For each contract I have a sheet which
has as name the client's code. There are lots of sheets. In each sheet the
structure is the same, so, for example in cell D9 in every sheet you'll find
the same info regarding that client
In another sheet, I want to put in a cell the client's code and to extract
the info I want from the client's sheet. So I want to use the sheet's name as
variable.
Is there a way I can do that with a function ?

Thx


tibby

function to use sheet's name as variable
 
Thanks guys ...

it worked

"tibby" wrote:

Hi,

I have a worksheet with contracts. For each contract I have a sheet which
has as name the client's code. There are lots of sheets. In each sheet the
structure is the same, so, for example in cell D9 in every sheet you'll find
the same info regarding that client
In another sheet, I want to put in a cell the client's code and to extract
the info I want from the client's sheet. So I want to use the sheet's name as
variable.
Is there a way I can do that with a function ?

Thx



All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com