0
   

MS Excel: How to return specific row within column based on numeric input?

 
 
Reply Tue 1 Jan, 2013 11:44 am
Hi everyone and a happy new year to all.

Is it possible to return the contents of a cell based on its numeric (row) location?

For example, suppose each cell in column C contains various types of data, suppose I am using cell A1 for input, and suppose I am using cell A2 for output.
In this case, is there a formula for cell A2 which would return a specific row in column C after entering a number in cell A1? (If I enter the number “5” in A1, A2 displays the contents of C5; if I enter the number “7” in A1, A2 displays the contents of C7; “10” displays C10, and so on).

Thanks beforehand for your help.
 
jespah
 
  2  
Reply Tue 1 Jan, 2013 11:57 am
@investor,
Huh.

You might need vb code for this.
timur
 
  3  
Reply Wed 2 Jan, 2013 11:02 am
@jespah,
No VB needed.

There is a simple function to solve it:
Indirect (cell address).

Look here:

http://imageshack.us/scaled/large/99/formula1n.jpg

Still, you need to put your full address in your first cell.
If you don't want to bother with putting the column letter in there, you can concatenate two columns, one of them being your fixed data column, and then hide the ones you don't want to see.

Look here an example:

http://imageshack.us/scaled/large/99/formula2.jpg

Use B1 to enter your data cell address and hide A1 and C1.

jespah
 
  1  
Reply Wed 2 Jan, 2013 11:16 am
@timur,
Hey, thanks.
timur
 
  1  
Reply Wed 2 Jan, 2013 12:10 pm
@jespah,
My pleasure...
0 Replies
 
investor
 
  1  
Reply Wed 2 Jan, 2013 10:09 pm
@timur,
Excellent. Thank you very much.
timur
 
  1  
Reply Thu 3 Jan, 2013 04:15 am
@investor,
You are welcome.
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » MS Excel: How to return specific row within column based on numeric input?
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.06 seconds on 11/15/2024 at 11:53:57