ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Inputting cell value from source cell based on value in adjacent cell. (https://www.excelbanter.com/excel-discussion-misc-queries/122082-inputting-cell-value-source-cell-based-value-adjacent-cell.html)

michaelberrier

Inputting cell value from source cell based on value in adjacent cell.
 
Title is kind of confusing, but basically it is this....

In cells A1:A4, there is a list of names, let say sports teams. In
cells B1:B4 are their rankings, obviously 1-4. Now, in cells C1 & C2
respectively, I want the names of the two teams that finish 1 & 2. I
thought about an =IF, but seems like that formula would have to be a
mile long to include all four teams and the possibility that they would
be ranked 1st or 2nd.

So I guess it would be something like "If B1:B4 =1, then the value of
whatever cell is next adjacent to that number.

Thanks.


RagDyeR

Inputting cell value from source cell based on value in adjacent cell.
 
Try this in C1:

=INDEX($A$1:$A$4,MATCH(ROWS($1:1),$B$1:$B$4,0))

And copy down.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"michaelberrier" wrote in message
ps.com...
Title is kind of confusing, but basically it is this....

In cells A1:A4, there is a list of names, let say sports teams. In
cells B1:B4 are their rankings, obviously 1-4. Now, in cells C1 & C2
respectively, I want the names of the two teams that finish 1 & 2. I
thought about an =IF, but seems like that formula would have to be a
mile long to include all four teams and the possibility that they would
be ranked 1st or 2nd.

So I guess it would be something like "If B1:B4 =1, then the value of
whatever cell is next adjacent to that number.

Thanks.



michaelberrier

Inputting cell value from source cell based on value in adjacent cell.
 
That ROCKS!

Thanks.
RagDyeR wrote:
Try this in C1:

=INDEX($A$1:$A$4,MATCH(ROWS($1:1),$B$1:$B$4,0))

And copy down.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"michaelberrier" wrote in message
ps.com...
Title is kind of confusing, but basically it is this....

In cells A1:A4, there is a list of names, let say sports teams. In
cells B1:B4 are their rankings, obviously 1-4. Now, in cells C1 & C2
respectively, I want the names of the two teams that finish 1 & 2. I
thought about an =IF, but seems like that formula would have to be a
mile long to include all four teams and the possibility that they would
be ranked 1st or 2nd.

So I guess it would be something like "If B1:B4 =1, then the value of
whatever cell is next adjacent to that number.

Thanks.



RagDyeR

Inputting cell value from source cell based on value in adjacent cell.
 
Thanks for the feed-back.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"michaelberrier" wrote in message
ps.com...
That ROCKS!

Thanks.
RagDyeR wrote:
Try this in C1:

=INDEX($A$1:$A$4,MATCH(ROWS($1:1),$B$1:$B$4,0))

And copy down.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"michaelberrier" wrote in message
ps.com...
Title is kind of confusing, but basically it is this....

In cells A1:A4, there is a list of names, let say sports teams. In
cells B1:B4 are their rankings, obviously 1-4. Now, in cells C1 & C2
respectively, I want the names of the two teams that finish 1 & 2. I
thought about an =IF, but seems like that formula would have to be a
mile long to include all four teams and the possibility that they would
be ranked 1st or 2nd.

So I guess it would be something like "If B1:B4 =1, then the value of
whatever cell is next adjacent to that number.

Thanks.





All times are GMT +1. The time now is 11:48 AM.

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