ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Referencing cells in different worksheets (https://www.excelbanter.com/excel-worksheet-functions/55413-referencing-cells-different-worksheets.html)

DiiRK

Referencing cells in different worksheets
 
I would like to reference cells in different worksheets (up to 9) based on a
number entered in cell G6. Below, I am using nested IF statements for a
reference to only two different worksheets. If I insert enought nested IF's
for 9 different worksheets, this statement will become huge and unweildy. Is
there a simpler way to reference worksheets named "Port Config Blate 1" thru
"Port Config Blade 9"?

=IF(G6="","",IF(F6=0,LOOKUP(G6,'Port Config Blade 0'!$B$7:$B$38, 'Port
Config Blade 0'!$G$7:$G$38)&"_"&LOOKUP(G6,'Port Config Blade 0'!$B$7:$B$38,
'Port Config Blade 0'!$H$7:$H$38),IF(F6=1,LOOKUP(G6,'Port Config Blade
1'!$B$7:$B$23, 'Port Config Blade 1'!$G$7:$G$23)&"_"&LOOKUP(G6,'Port Config
Blade 1'!$B$7:$B$23, 'Port Config Blade 1'!$H$7:$H$23))))

Thanks!

Bob Phillips

Referencing cells in different worksheets
 
=IF(G6="","",
LOOKUP(G6,INDIRECT("'Port Config Blade "&F6&"'!$B$7:$B$38"),
INDIRECT("'Port Config Blade "&F6&"'!$G$7:$G$38"))&"_"&
LOOKUP(G6,INDIRECT("'Port Config Blade "&F6&"'!$B$7:$B$38"),
INDIRECT("'Port Config Blade "&F6&"!$H$7:$H$38")))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"DiiRK" wrote in message
...
I would like to reference cells in different worksheets (up to 9) based on

a
number entered in cell G6. Below, I am using nested IF statements for a
reference to only two different worksheets. If I insert enought nested

IF's
for 9 different worksheets, this statement will become huge and unweildy.

Is
there a simpler way to reference worksheets named "Port Config Blate 1"

thru
"Port Config Blade 9"?

=IF(G6="","",IF(F6=0,LOOKUP(G6,'Port Config Blade 0'!$B$7:$B$38, 'Port
Config Blade 0'!$G$7:$G$38)&"_"&LOOKUP(G6,'Port Config Blade

0'!$B$7:$B$38,
'Port Config Blade 0'!$H$7:$H$38),IF(F6=1,LOOKUP(G6,'Port Config Blade
1'!$B$7:$B$23, 'Port Config Blade 1'!$G$7:$G$23)&"_"&LOOKUP(G6,'Port

Config
Blade 1'!$B$7:$B$23, 'Port Config Blade 1'!$H$7:$H$23))))

Thanks!





All times are GMT +1. The time now is 06:25 AM.

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