Cell Value Within Formula

Cell Value Within Formula

Post by Clint20 » Mon, 26 Feb 2001 02:09:54



In Cell "C2" I have a value or "12"
In Cell"C4" I have a formula somethine like = M12+N12+Q12

Is there a way in "C4" to have the formula reference "C2"
So if the value of "C2"were changed to 18
"C4" would change to:  =M18+N18+Q12

Thanks in advance  

 
 
 

Cell Value Within Formula

Post by Niek Otte » Mon, 26 Feb 2001 02:49:33


Have a look at the INDIRECT() function. Look in HELP for details

Regards,

Niek Otten



|
| In Cell "C2" I have a value or "12"
| In Cell"C4" I have a formula somethine like = M12+N12+Q12
|
| Is there a way in "C4" to have the formula reference "C2"
| So if the value of "C2"were changed to 18
| "C4" would change to:  =M18+N18+Q12
|
| Thanks in advance
|
|
|
|

 
 
 

Cell Value Within Formula

Post by Harlan Grov » Mon, 26 Feb 2001 04:41:11



>In Cell "C2" I have a value or "12" In Cell"C4" I have a formula
>somethine like = M12+N12+Q12

>Is there a way in "C4" to have the formula reference "C2" So if the
>value of "C2"were changed to 18
>"C4" would change to:  =M18+N18+Q12

Consider INDEX()

=INDEX(M$1:M$65536,C2)+INDEX(N$1:N$65536,C2)+Q12

or more cleverly (since M and N are adjacent)

=SUM(INDEX(M$1:N$65536,C2,),Q12)

 
 
 

Cell Value Within Formula

Post by Ivar » Mon, 26 Feb 2001 04:59:14


Quote:>In Cell "C2" I have a value or "12"
>In Cell"C4" I have a formula somethine like = M12+N12+Q12

>Is there a way in "C4" to have the formula reference "C2"
>So if the value of "C2"were changed to 18
>"C4" would change to:  =M18+N18+Q12

Use the =INDIRECT() function. Did you intend to not include column Q in the
reference to cell C2? If you did, then the formula would be:

=INDIRECT("M"&C2)+INDIRECT("N"&C2)+Q12