ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Match a value from a column in worksheet (https://www.excelbanter.com/excel-worksheet-functions/39585-match-value-column-worksheet.html)

WilliamVierra

Match a value from a column in worksheet
 

I am attempting to match a value from a column in worksheet “A” with and
insert the name associated with the value in the next column over. The
value/name combinations are in worksheet “B”.

This is the formula I have that works only for the first value.

{=(IF(I5=('B'!$A$2:$A$100),('B'!$B$2:$B$100)))}

This is an example of the data in the column

Column I
118107MB
122221MB

This is an example of the data in worksheet “B”

Column A Column B
118107MB AAA
122221MB BBB


--
WilliamVierra
------------------------------------------------------------------------
WilliamVierra's Profile: http://www.excelforum.com/member.php...o&userid=26107
View this thread: http://www.excelforum.com/showthread...hreadid=394381


Aladin Akyurek

=VLOOKUP(I5,'B'!$A$2:$B$100,2,0)

WilliamVierra wrote:
I am attempting to match a value from a column in worksheet “A” with and
insert the name associated with the value in the next column over. The
value/name combinations are in worksheet “B”.

This is the formula I have that works only for the first value.

{=(IF(I5=('B'!$A$2:$A$100),('B'!$B$2:$B$100)))}

This is an example of the data in the column

Column I
118107MB
122221MB

This is an example of the data in worksheet “B”

Column A Column B
118107MB AAA
122221MB BBB



--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.

WilliamVierra


Thanks Aladin,

=VLOOKUP(I5,'Account Name'!$A$2:$B$100,2,0)

Worked! I had tried VLOOKUP earlier and it failed due to my error in
the formula.

Thanks for taking the time to reply.


--
WilliamVierra
------------------------------------------------------------------------
WilliamVierra's Profile: http://www.excelforum.com/member.php...o&userid=26107
View this thread: http://www.excelforum.com/showthread...hreadid=394381



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

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