Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula to compare columns

Hi,

Here is the challenge I'm having:

A B C D
1 6 500
3 5 200
5 4 100

I need to see if the value in cell A1 (etc.) appears in column C and if it
does then I want to return the value from column D in column B. So in this
case cell A3 matches C2 so I need the value in cell D2 to appear in cell B3.
Hopefully this makes sense and somebody will be able to help. Thanks in
advance!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 202
Default Formula to compare columns

Put this in cell B1 and then copy down (change your range accordingly)
=IF(ISNA(VLOOKUP(A1,$C$1:$D$3,2,FALSE)),"",VLOOKUP (A1,$C$1:$D$3,2,FALSE))

"EDF2017" wrote:

Hi,

Here is the challenge I'm having:

A B C D
1 6 500
3 5 200
5 4 100

I need to see if the value in cell A1 (etc.) appears in column C and if it
does then I want to return the value from column D in column B. So in this
case cell A3 matches C2 so I need the value in cell D2 to appear in cell B3.
Hopefully this makes sense and somebody will be able to help. Thanks in
advance!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 169
Default Formula to compare columns

Assuming you have unique values in both A and C, I think the formula would
look like this:

=If(ISERROR(VLOOKUP(A1,C:D,2,FALSE)),"",VLOOKUP(A1 ,C:D,2,FALSE))

This would return the corresponding value from D where there is a match and
a blank if there is no match
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"EDF2017" wrote:

Hi,

Here is the challenge I'm having:

A B C D
1 6 500
3 5 200
5 4 100

I need to see if the value in cell A1 (etc.) appears in column C and if it
does then I want to return the value from column D in column B. So in this
case cell A3 matches C2 so I need the value in cell D2 to appear in cell B3.
Hopefully this makes sense and somebody will be able to help. Thanks in
advance!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Formula to compare columns

Maybe one way:

=INDEX(A$1:D$3,MATCH(A3,C$1:C$3,0),4)

Adjust your ranges as needed.

Regards,
Paul

--

"EDF2017" wrote in message
...
Hi,

Here is the challenge I'm having:

A B C D
1 6 500
3 5 200
5 4 100

I need to see if the value in cell A1 (etc.) appears in column C and if it
does then I want to return the value from column D in column B. So in this
case cell A3 matches C2 so I need the value in cell D2 to appear in cell
B3.
Hopefully this makes sense and somebody will be able to help. Thanks in
advance!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to compare numbers in 3 columns 3/23/08 Marie FP[_2_] Excel Discussion (Misc queries) 7 March 25th 08 04:13 AM
Formula to compare numbers in 3 columns Marie FP[_2_] Excel Discussion (Misc queries) 1 March 24th 08 01:50 AM
Excel Formula or tool to compare two columns of data RBS Excel Worksheet Functions 3 April 14th 06 06:54 PM
Formula needed to compare columns VP New Users to Excel 2 September 8th 05 09:00 AM


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

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

About Us

"It's about Microsoft Excel"