Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kb7dfs
 
Posts: n/a
Default can i use a cell value as another sheet's cell reference

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default can i use a cell value as another sheet's cell reference

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" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Krishnakumar
 
Posts: n/a
Default can i use a cell value as another sheet's cell reference


Hi,

Try something like..

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


--
Krishnakumar


------------------------------------------------------------------------
Krishnakumar's Profile: http://www.excelforum.com/member.php...o&userid=20138
View this thread: http://www.excelforum.com/showthread...hreadid=496106

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default can i use a cell value as another sheet's cell reference

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kb7dfs
 
Posts: n/a
Default can i use a cell value as another sheet's cell reference

works like a charm, thank you so much

"Biff" wrote:

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" wrote in message
...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Reference locking Hysteresis Excel Discussion (Misc queries) 1 November 3rd 05 05:05 PM
Getting contents of a cell when cell reference is in the sheet A Nelson Excel Discussion (Misc queries) 3 October 5th 05 06:46 PM
reference to sheets without using sheet names Wes Excel Worksheet Functions 13 September 3rd 05 08:15 PM
Flexible Cell Reference Brandt Excel Discussion (Misc queries) 5 June 2nd 05 10:23 PM
name of another worksheet in cell for reference Tom A Johnson Excel Worksheet Functions 2 November 11th 04 11:28 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"