PC Review


Reply
Thread Tools Rate Thread

Comparing 3 Columns and Returning a Result

 
 
ma
Guest
Posts: n/a
 
      28th Apr 2010
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 With Quote
 
 
 
 
Eduardo
Guest
Posts: n/a
 
      28th Apr 2010
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 With Quote
 
ma
Guest
Posts: n/a
 
      29th Apr 2010
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing 1 number to 1000's and returning corresponding name EngelseBoer Microsoft Excel Misc 6 10th Aug 2008 06:59 PM
Returning a text result from 2 lookup columns =?Utf-8?B?c2Ft?= Microsoft Excel Misc 4 14th Jun 2007 02:14 PM
comparing columns and returning max value quetzalc0atl@hotmail.com Microsoft Excel Misc 2 13th Oct 2006 02:03 PM
comparing two lists and returning value from different column =?Utf-8?B?RHVzZXI=?= Microsoft Excel Worksheet Functions 6 25th Mar 2006 06:04 PM
Comparing values in two columns to generate result in a third column andersonpdx Microsoft Excel Worksheet Functions 3 16th Apr 2004 06:10 PM


Features
 

Advertising
 

Newsgroups
 


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