#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Lookup??

I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer column
and then put YES or NO accordingly beside each number in the shorter column.
Hope that is clear. How do I do this? Connie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6,953
Default Lookup??

Assume short column is B and long column is A. In C1:
=if(countif($A:$A,$B1),"yes","no")

then drag fill down to the bottom of the short column.

--
Regards,
Tom Ogilvy


"Connie Martin" wrote:

I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer column
and then put YES or NO accordingly beside each number in the shorter column.
Hope that is clear. How do I do this? Connie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Lookup??

With
The short list in Col_A, beginning in A1
Only the long list (sorted or unsorted) in Col_C ( no non-list items in
Col_C)

This formula flags Col_A items matched in Col_C:
B1: =IF(COUNT(MATCH(A1,C:C,0)),"YES","NO")
Copy that formula down as far as you need

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Connie Martin" wrote in message
...
I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I
would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer
column
and then put YES or NO accordingly beside each number in the shorter
column.
Hope that is clear. How do I do this? Connie



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Lookup??

Thank you very much. That works. Another one for my file! Connie

"Tom Ogilvy" wrote:

Assume short column is B and long column is A. In C1:
=if(countif($A:$A,$B1),"yes","no")

then drag fill down to the bottom of the short column.

--
Regards,
Tom Ogilvy


"Connie Martin" wrote:

I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer column
and then put YES or NO accordingly beside each number in the shorter column.
Hope that is clear. How do I do this? Connie

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Lookup??

Thank you, Ron. Both yours and Tom's give the same answer although different
formulas. Thanks so much. I love this newsgroup. There's so much help here!

Connie

"Ron Coderre" wrote:

With
The short list in Col_A, beginning in A1
Only the long list (sorted or unsorted) in Col_C ( no non-list items in
Col_C)

This formula flags Col_A items matched in Col_C:
B1: =IF(COUNT(MATCH(A1,C:C,0)),"YES","NO")
Copy that formula down as far as you need

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Connie Martin" wrote in message
...
I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I
would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer
column
and then put YES or NO accordingly beside each number in the shorter
column.
Hope that is clear. How do I do this? Connie






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Lookup??

Thanks for the feedback, Connie

(You might notice a performance hit using the COUNTIF approach because it
will search the entire column to count instances. Whereas, the MATCH
approach stops at the first hit.)

***********
Regards,
Ron

XL2003, WinXP


"Connie Martin" wrote:

Thank you, Ron. Both yours and Tom's give the same answer although different
formulas. Thanks so much. I love this newsgroup. There's so much help here!

Connie

"Ron Coderre" wrote:

With
The short list in Col_A, beginning in A1
Only the long list (sorted or unsorted) in Col_C ( no non-list items in
Col_C)

This formula flags Col_A items matched in Col_C:
B1: =IF(COUNT(MATCH(A1,C:C,0)),"YES","NO")
Copy that formula down as far as you need

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Connie Martin" wrote in message
...
I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I
would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer
column
and then put YES or NO accordingly beside each number in the shorter
column.
Hope that is clear. How do I do this? Connie




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
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Sumproduct - Condition based on lookup of a Lookup Hari Excel Discussion (Misc queries) 12 May 31st 06 09:28 AM
Advanced Lookup (lookup for 2 values) 0-0 Wai Wai ^-^ Excel Worksheet Functions 2 March 30th 06 07:09 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


All times are GMT +1. The time now is 10:02 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"