can i use a cell value as another sheet's cell reference

G

Guest

I have a multi-page workbook, I am trying to use an age value in "sheet 1".
Based on the age, i want to execute a number of IF functions to determine a
given criteria is met. I want to use the age as the reference for the
criteria list

=IF($D5="m",(IF(E5>='boy-pres'!$C$7,"P",IF(E5>='boy-natl'!$C$7,"N",""))),(IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N",""))))

In this case Sheet1!C5 = 7, I want to use the value of C5 in the reference
'boy-pres'!$C[value of Sheet1!C5]

I've tried using &, but i keep getting a syntax error.
 
B

Biff

Hi!

Hmmm......

First, let's correct your formula so it's syntactically correct and doesn't
return #REF! errors:

=IF($D5="m",IF(E5>='boy-pres'!$C$7,"P",IF(E5>='boy-natl'!$C$7,"N","")),IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N","")))
In this case Sheet1!C5 = 7, I want to use the value of C5 in the reference
'boy-pres'!$C[value of Sheet1!C5]

Do you only want the "boy-pres" reference to do that?

=IF($D5="m",IF(E5>=INDIRECT("'boy-pres'!C"&C5),"P",IF(E5>='boy-natl'!$C$7,"N","")),IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N","")))

Biff

kb7dfs said:
I have a multi-page workbook, I am trying to use an age value in "sheet 1".
Based on the age, i want to execute a number of IF functions to determine
a
given criteria is met. I want to use the age as the reference for the
criteria list

=IF($D5="m",(IF(E5>='boy-pres'!$C$7,"P",IF(E5>='boy-natl'!$C$7,"N",""))),(IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N",""))))

In this case Sheet1!C5 = 7, I want to use the value of C5 in the reference
'boy-pres'!$C[value of Sheet1!C5]

I've tried using &, but i keep getting a syntax error.
 
K

Krishnakumar

Hi,

Try something like..

IF(E5>=INDIRECT("'boy-pres'!C"&INDIRECT("'Sheet2'!C5")),..
 
V

vezerid

Although I am not really sure, it seems you need the INDIRECT()
function. Something like:
INDIRECT("'boy-pres'!$C$" & Sheet1!C5).

Does this help?

Kostis Vezerides
 
G

Guest

works like a charm, thank you so much

Biff said:
Hi!

Hmmm......

First, let's correct your formula so it's syntactically correct and doesn't
return #REF! errors:

=IF($D5="m",IF(E5>='boy-pres'!$C$7,"P",IF(E5>='boy-natl'!$C$7,"N","")),IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N","")))
In this case Sheet1!C5 = 7, I want to use the value of C5 in the reference
'boy-pres'!$C[value of Sheet1!C5]

Do you only want the "boy-pres" reference to do that?

=IF($D5="m",IF(E5>=INDIRECT("'boy-pres'!C"&C5),"P",IF(E5>='boy-natl'!$C$7,"N","")),IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N","")))

Biff

kb7dfs said:
I have a multi-page workbook, I am trying to use an age value in "sheet 1".
Based on the age, i want to execute a number of IF functions to determine
a
given criteria is met. I want to use the age as the reference for the
criteria list

=IF($D5="m",(IF(E5>='boy-pres'!$C$7,"P",IF(E5>='boy-natl'!$C$7,"N",""))),(IF(E5>='girl-pres'!$C$7,"P",IF(E5>='girl-natl'!$C$7,"N",""))))

In this case Sheet1!C5 = 7, I want to use the value of C5 in the reference
'boy-pres'!$C[value of Sheet1!C5]

I've tried using &, but i keep getting a syntax error.
 

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