ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using a certain cell based on the value of another cell (https://www.excelbanter.com/excel-worksheet-functions/114133-using-certain-cell-based-value-another-cell.html)

Tommy

Using a certain cell based on the value of another cell
 
I'm having trouble finding a function or its syntax to do the
following.
I have a numeric value in a cell, say k12 whose value is 5.
Based on this value 5. I want to perform a mathmatical operation like
subtraction using cell E5. So the value in k12 specifies the row of
column E I want to use.
Logically I picture the syntax as being =E(k12), which would use the
value in E5 for my further calculations. This of course doesn't work
out.
Can anybody help?


Biff

Using a certain cell based on the value of another cell
 
Try one of these:

You didn't say "how" your subtraction should work so I'll assume you want to
subtract this value from cell A1:

=A1-INDEX(E:E,K12)

=A1-IF(K12="",0,INDIRECT("E"&K12))

Biff

"Tommy" wrote in message
oups.com...
I'm having trouble finding a function or its syntax to do the
following.
I have a numeric value in a cell, say k12 whose value is 5.
Based on this value 5. I want to perform a mathmatical operation like
subtraction using cell E5. So the value in k12 specifies the row of
column E I want to use.
Logically I picture the syntax as being =E(k12), which would use the
value in E5 for my further calculations. This of course doesn't work
out.
Can anybody help?




Elkar

Using a certain cell based on the value of another cell
 
Try the INDIRECT function.

=INDIRECT("E"&K12)

HTH,
Elkar


"Tommy" wrote:

I'm having trouble finding a function or its syntax to do the
following.
I have a numeric value in a cell, say k12 whose value is 5.
Based on this value 5. I want to perform a mathmatical operation like
subtraction using cell E5. So the value in k12 specifies the row of
column E I want to use.
Logically I picture the syntax as being =E(k12), which would use the
value in E5 for my further calculations. This of course doesn't work
out.
Can anybody help?



Tommy

Using a certain cell based on the value of another cell
 
Thanks, does just what I need it to do.
Elkar wrote:
Try the INDIRECT function.

=INDIRECT("E"&K12)

HTH,
Elkar


"Tommy" wrote:

I'm having trouble finding a function or its syntax to do the
following.
I have a numeric value in a cell, say k12 whose value is 5.
Based on this value 5. I want to perform a mathmatical operation like
subtraction using cell E5. So the value in k12 specifies the row of
column E I want to use.
Logically I picture the syntax as being =E(k12), which would use the
value in E5 for my further calculations. This of course doesn't work
out.
Can anybody help?





All times are GMT +1. The time now is 10:42 AM.

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