Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Comparing two columns and return a third

I'm having some trouble. I'd like to compare two columns and return data
from a third column when True.

For example:

Compare column A to Column C - Rows 1-1000. If A1 appears anywhere in
C1-1000 i want to return the "text" in column D. The row in D is = to the
true value in C.

i.e.

If A1=C47 I want to return the text in D47. Then repeat this for A2-A1000.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Comparing two columns and return a third

Something along these lines, I think - put this formula in D1:

=IF(COUNTIF(A$1:A$1000,C1)0,C1,"no match")

and copy down.

This is taking the approach:

"if C1 appears anywhere in A1:A1000, then put C1 into D1"

which I think is logically equivalent to what you said.

Hope this helps.

Pete


On Nov 22, 8:15 pm, casedk wrote:
I'm having some trouble. I'd like to compare two columns and return data
from a third column when True.

For example:

Compare column A to Column C - Rows 1-1000. If A1 appears anywhere in
C1-1000 i want to return the "text" in column D. The row in D is = to the
true value in C.

i.e.

If A1=C47 I want to return the text in D47. Then repeat this for A2-A1000.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Comparing two columns and return a third

Pete,

Thanks! The countif took care of my issue with not counting the entire
range!

However, I still have the issue with the True statement. If my countif is
true C1 appears somewhere between A1-A1000 I need to know where that "true"
value was in A1-A1000. Was it A1 or A246 or A934 ....

If C1 appears in A246 then I'd like to put D246 in as my true statement.

In my problem A and D are related:
A=id number
B=description (text)

C=random range of id numbers that I need the description (D).

I want to see if C 1 appears anywhere in A 1-1000 (which your formula does).
Once I find a place where C1=Ax I want to take that description Dx and place
it in E1.

So, I think I may need a second formula or need to modify the true statement.


Thanks for you help.

"Pete_UK" wrote:

Something along these lines, I think - put this formula in D1:

=IF(COUNTIF(A$1:A$1000,C1)0,C1,"no match")

and copy down.

This is taking the approach:

"if C1 appears anywhere in A1:A1000, then put C1 into D1"

which I think is logically equivalent to what you said.

Hope this helps.

Pete


On Nov 22, 8:15 pm, casedk wrote:
I'm having some trouble. I'd like to compare two columns and return data
from a third column when True.

For example:

Compare column A to Column C - Rows 1-1000. If A1 appears anywhere in
C1-1000 i want to return the "text" in column D. The row in D is = to the
true value in C.

i.e.

If A1=C47 I want to return the text in D47. Then repeat this for A2-A1000.

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Comparing two columns and return a third

You've changed the wording round now from what you originally put. Try
it this way round:

=IF(COUNTIF(C$1:C$1000,A1)0,A1,"no match")

if column A contains the important "text".

Hope this helps.

Pete

On Nov 22, 11:43 pm, casedk wrote:
Pete,

Thanks! The countif took care of my issue with not counting the entire
range!

However, I still have the issue with the True statement. If my countif is
true C1 appears somewhere between A1-A1000 I need to know where that "true"
value was in A1-A1000. Was it A1 or A246 or A934 ....

If C1 appears in A246 then I'd like to put D246 in as my true statement.

In my problem A and D are related:
A=id number
B=description (text)

C=random range of id numbers that I need the description (D).

I want to see if C 1 appears anywhere in A 1-1000 (which your formula does).
Once I find a place where C1=Ax I want to take that description Dx and place
it in E1.

So, I think I may need a second formula or need to modify the true statement.

Thanks for you help.



"Pete_UK" wrote:
Something along these lines, I think - put this formula in D1:


=IF(COUNTIF(A$1:A$1000,C1)0,C1,"no match")


and copy down.


This is taking the approach:


"if C1 appears anywhere in A1:A1000, then put C1 into D1"


which I think is logically equivalent to what you said.


Hope this helps.


Pete


On Nov 22, 8:15 pm, casedk wrote:
I'm having some trouble. I'd like to compare two columns and return data
from a third column when True.


For example:


Compare column A to Column C - Rows 1-1000. If A1 appears anywhere in
C1-1000 i want to return the "text" in column D. The row in D is = to the
true value in C.


i.e.


If A1=C47 I want to return the text in D47. Then repeat this for A2-A1000.


Thanks- Hide quoted text -


- Show quoted text -


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 two combos/cells to return a value [email protected] Excel Worksheet Functions 0 October 2nd 07 06:47 PM
comparing cell to row, return all matchs Dave Excel Worksheet Functions 5 August 31st 07 04:07 PM
Comparing two columns of information with 2 new columns of informa cbuck Excel Discussion (Misc queries) 1 January 16th 07 09:49 PM
sumproduct return value by comparing two criteria..... [email protected] Excel Worksheet Functions 8 January 5th 07 06:47 PM
Comparing two lists and return specified data Clement Excel Worksheet Functions 2 January 12th 06 06:31 PM


All times are GMT +1. The time now is 05:40 PM.

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"