Referencing cells in different worksheets

G

Guest

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!
 
B

Bob Phillips

=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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top