Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
MA MA is offline
external usenet poster
 
Posts: 15
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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,276
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   Report Post  
Posted to microsoft.public.excel.newusers
MA MA is offline
external usenet poster
 
Posts: 15
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

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
Comparing 1 number to 1000's and returning corresponding name EngelseBoer Excel Discussion (Misc queries) 6 August 10th 08 06:59 PM
Returning a text result from 2 lookup columns sam Excel Discussion (Misc queries) 4 June 14th 07 02:14 PM
comparing columns and returning max value [email protected] Excel Discussion (Misc queries) 2 October 13th 06 02:03 PM
comparing two lists and returning value from different column Duser Excel Worksheet Functions 4 March 25th 06 04:40 PM
Comparing databases and returning values Jonas Excel Worksheet Functions 0 March 6th 06 04:41 PM


All times are GMT +1. The time now is 06:35 AM.

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

About Us

"It's about Microsoft Excel"