ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using a formula to select a cell using the row and column values (https://www.excelbanter.com/excel-worksheet-functions/214881-using-formula-select-cell-using-row-column-values.html)

RodneyN

Using a formula to select a cell using the row and column values
 
With a value in cell C2 of 1. Can't I use a formula in cell D1 that says
let D1 equal the contents of cell A(c2). So D1 will equal the value of cell
A1? Or if c2 equaled a value of 4 then D1 would be equal to the value of
cell A4?

JBeaucaire[_9_]

Using a formula to select a cell using the row and column values
 

In D1, enter the formula:

*=INDIRECT("C"&C2)
*
If you understand using the & to concatenate strings together, INDIRECT
let's you piece together a cell reference any way you want, then the
resulting cell reference becomes an active answer. Read up on it.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45054


T. Valko

Using a formula to select a cell using the row and column values
 
Try this:

=INDEX(A:A,C2)

If C2 is empty it will return the value from A1.

--
Biff
Microsoft Excel MVP


"RodneyN" wrote in message
...
With a value in cell C2 of 1. Can't I use a formula in cell D1 that says
let D1 equal the contents of cell A(c2). So D1 will equal the value of
cell
A1? Or if c2 equaled a value of 4 then D1 would be equal to the value of
cell A4?




Max

Using a formula to select a cell using the row and column values
 
My intuition tells me that INDIRECT is what you are looking for
In D1: =INDIRECT("A"&C2)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"RodneyN" wrote:
With a value in cell C2 of 1. Can't I use a formula in cell D1 that says
let D1 equal the contents of cell A(c2). So D1 will equal the value of cell
A1? Or if c2 equaled a value of 4 then D1 would be equal to the value of
cell A4?


RodneyN

Using a formula to select a cell using the row and column valu
 
Thank you.

"Max" wrote:

My intuition tells me that INDIRECT is what you are looking for
In D1: =INDIRECT("A"&C2)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"RodneyN" wrote:
With a value in cell C2 of 1. Can't I use a formula in cell D1 that says
let D1 equal the contents of cell A(c2). So D1 will equal the value of cell
A1? Or if c2 equaled a value of 4 then D1 would be equal to the value of
cell A4?


RodneyN

Using a formula to select a cell using the row and column valu
 
Thank you

"T. Valko" wrote:

Try this:

=INDEX(A:A,C2)

If C2 is empty it will return the value from A1.

--
Biff
Microsoft Excel MVP


"RodneyN" wrote in message
...
With a value in cell C2 of 1. Can't I use a formula in cell D1 that says
let D1 equal the contents of cell A(c2). So D1 will equal the value of
cell
A1? Or if c2 equaled a value of 4 then D1 would be equal to the value of
cell A4?





RodneyN

Using a formula to select a cell using the row and column valu
 
Thank you

"JBeaucaire" wrote:


In D1, enter the formula:

*=INDIRECT("C"&C2)
*
If you understand using the & to concatenate strings together, INDIRECT
let's you piece together a cell reference any way you want, then the
resulting cell reference becomes an active answer. Read up on it.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45054



T. Valko

Using a formula to select a cell using the row and column valu
 
You're welcome!

--
Biff
Microsoft Excel MVP


"RodneyN" wrote in message
...
Thank you

"T. Valko" wrote:

Try this:

=INDEX(A:A,C2)

If C2 is empty it will return the value from A1.

--
Biff
Microsoft Excel MVP


"RodneyN" wrote in message
...
With a value in cell C2 of 1. Can't I use a formula in cell D1 that
says
let D1 equal the contents of cell A(c2). So D1 will equal the value of
cell
A1? Or if c2 equaled a value of 4 then D1 would be equal to the value
of
cell A4?







Max

Using a formula to select a cell using the row and column valu
 
Welcome, but pl spare a moment to press the YES buttons in ALL responses
which helped you.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"RodneyN" wrote:
Thank you.




All times are GMT +1. The time now is 07:00 AM.

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