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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Comparing 3 Columns and Returning a Result



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2010, 05:49 PM posted to microsoft.public.excel.newusers
MA
external usenet poster
 
Posts: 23
Default Comparing 3 Columns and Returning a Result

Hello.

I have 3 columns I want to compare, A, B & C. All the values are text values.

What formula would I use if I want to determine the following:

If a value in column A is found in column B, then return the value in column
C (which corresponds to column B) and place in column D.

When I attempted to write the formula using the IF logic, it only worked
when the values in columns A & B were on the same row. This, however, is not
the case for all rows. There are more unique values found in B then in A.

Example
A B C D
Apple Banana Yes No
Banana Apple No Yes
Grape No
  #2  
Old April 28th, 2010, 06:10 PM posted to microsoft.public.excel.newusers
eduardo
external usenet poster
 
Posts: 2,131
Default Comparing 3 Columns and Returning a Result

Hi,

=index($C$1:$C$1000,match(a1,$B$1:$B$1000,0))

"ma" wrote:

Hello.

I have 3 columns I want to compare, A, B & C. All the values are text values.

What formula would I use if I want to determine the following:

If a value in column A is found in column B, then return the value in column
C (which corresponds to column B) and place in column D.

When I attempted to write the formula using the IF logic, it only worked
when the values in columns A & B were on the same row. This, however, is not
the case for all rows. There are more unique values found in B then in A.

Example
A B C D
Apple Banana Yes No
Banana Apple No Yes
Grape No

  #3  
Old April 29th, 2010, 08:18 PM posted to microsoft.public.excel.newusers
MA
external usenet poster
 
Posts: 23
Default Comparing 3 Columns and Returning a Result

Thank you!

"Eduardo" wrote:

Hi,

=index($C$1:$C$1000,match(a1,$B$1:$B$1000,0))

"ma" wrote:

Hello.

I have 3 columns I want to compare, A, B & C. All the values are text values.

What formula would I use if I want to determine the following:

If a value in column A is found in column B, then return the value in column
C (which corresponds to column B) and place in column D.

When I attempted to write the formula using the IF logic, it only worked
when the values in columns A & B were on the same row. This, however, is not
the case for all rows. There are more unique values found in B then in A.

Example
A B C D
Apple Banana Yes No
Banana Apple No Yes
Grape No

 




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 10:10 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.