ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I use a worsheet name (filename), and a range name as values? (https://www.excelbanter.com/excel-discussion-misc-queries/207836-can-i-use-worsheet-name-filename-range-name-values.html)

RobertoB

Can I use a worsheet name (filename), and a range name as values?
 
Hi, I have a case where I get two files all the time, the files needs to be
combine, and they have different lenght of rows always, so I wonder if in one
part of my formula I can refer to a value in a cell, instead of the filename
itself. for example if a formula needs to read data in one file name toby, in
some part of the formula the filename will be embedded, together with the
sheet name, but what I want is to create a setup sheet where i put values
like:

Input file 1=Source1.xls
Input sheet 1=end_of_day
range 1=A1:Z200

So my formula picks up the source1.xls, the end_of_day and the range from
this "variables", which will apply for filr 1 and 2 that need to be
processed, isntead of my applying all the formulas to this files again.

Is that possible?

Thank you.

sb1920alk

Can I use a worsheet name (filename), and a range name as values?
 
Just using INDIRECT

"RobertoB" wrote:

Hi, I have a case where I get two files all the time, the files needs to be
combine, and they have different lenght of rows always, so I wonder if in one
part of my formula I can refer to a value in a cell, instead of the filename
itself. for example if a formula needs to read data in one file name toby, in
some part of the formula the filename will be embedded, together with the
sheet name, but what I want is to create a setup sheet where i put values
like:

Input file 1=Source1.xls
Input sheet 1=end_of_day
range 1=A1:Z200

So my formula picks up the source1.xls, the end_of_day and the range from
this "variables", which will apply for filr 1 and 2 that need to be
processed, isntead of my applying all the formulas to this files again.

Is that possible?

Thank you.


sb1920alk

Can I use a worsheet name (filename), and a range name as values?
 
Forgive my previous typo.

Try using INDIRECT.

"RobertoB" wrote:

Hi, I have a case where I get two files all the time, the files needs to be
combine, and they have different lenght of rows always, so I wonder if in one
part of my formula I can refer to a value in a cell, instead of the filename
itself. for example if a formula needs to read data in one file name toby, in
some part of the formula the filename will be embedded, together with the
sheet name, but what I want is to create a setup sheet where i put values
like:

Input file 1=Source1.xls
Input sheet 1=end_of_day
range 1=A1:Z200

So my formula picks up the source1.xls, the end_of_day and the range from
this "variables", which will apply for filr 1 and 2 that need to be
processed, isntead of my applying all the formulas to this files again.

Is that possible?

Thank you.



All times are GMT +1. The time now is 08:55 PM.

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