A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Match value in one column and return value in same row in next col



 
 
Thread Tools Display Modes
  #1  
Old March 6th, 2010, 07:43 PM posted to microsoft.public.excel.worksheet.functions
Zuo
external usenet poster
 
Posts: 24
Default Match value in one column and return value in same row in next col

Hi,

I have a a set of values in A1 through A100. I need to look up each value
and find a match in another set of values located in C1 through C200. If a
match is found then I need the formula located in column B to return the
value in the same row but the next column over (D).

Example:

A B C D
359 375 10012
456 125 10031
125 10031 952 10052
854 444 10017


The formula located in B3 should find that the value of 125 (located in A3)
matches the value in C2 and returns 10031 which is the value located in the
next column over in the same row.

Thanks,

Zuo
  #2  
Old March 6th, 2010, 08:13 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Match value in one column and return value in same row in next col

"Zuo" wrote:
I have a a set of values in A1 through A100.
I need to look up each value and find a match in
another set of values located in C1 through C200.
If a match is found then I need the formula located
in column B to return the value in the same row but
the next column over (D).


=IF(ISNUMBER(VLOOKUP(A1,$C$1:$D$200,2,0)),
VLOOKUP(A1,$C$1:$D$200,2,0), "")

Copy down through A100.

If you have Excel 2007, I believe this can be written more succinctly. I do
not have Excel 2007, but I believe the following syntax works:

=IFERROR(VLOOKUP(A1,$C$1:$D$200,2,0)), "")


----- original message -----

"Zuo" wrote:
Hi,

I have a a set of values in A1 through A100. I need to look up each value
and find a match in another set of values located in C1 through C200. If a
match is found then I need the formula located in column B to return the
value in the same row but the next column over (D).

Example:

A B C D
359 375 10012
456 125 10031
125 10031 952 10052
854 444 10017


The formula located in B3 should find that the value of 125 (located in A3)
matches the value in C2 and returns 10031 which is the value located in the
next column over in the same row.

Thanks,

Zuo

  #3  
Old March 6th, 2010, 09:28 PM posted to microsoft.public.excel.worksheet.functions
Zuo
external usenet poster
 
Posts: 24
Default Match value in one column and return value in same row in next

Thank you so much it works perfect!

"Joe User" wrote:

"Zuo" wrote:
I have a a set of values in A1 through A100.
I need to look up each value and find a match in
another set of values located in C1 through C200.
If a match is found then I need the formula located
in column B to return the value in the same row but
the next column over (D).


=IF(ISNUMBER(VLOOKUP(A1,$C$1:$D$200,2,0)),
VLOOKUP(A1,$C$1:$D$200,2,0), "")

Copy down through A100.

If you have Excel 2007, I believe this can be written more succinctly. I do
not have Excel 2007, but I believe the following syntax works:

=IFERROR(VLOOKUP(A1,$C$1:$D$200,2,0)), "")


----- original message -----

"Zuo" wrote:
Hi,

I have a a set of values in A1 through A100. I need to look up each value
and find a match in another set of values located in C1 through C200. If a
match is found then I need the formula located in column B to return the
value in the same row but the next column over (D).

Example:

A B C D
359 375 10012
456 125 10031
125 10031 952 10052
854 444 10017


The formula located in B3 should find that the value of 125 (located in A3)
matches the value in C2 and returns 10031 which is the value located in the
next column over in the same row.

Thanks,

Zuo

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.