Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to compare one column to another?

Hi everyone,

I have two columns of strings, both in ascending order. Similar lists but
not identical. Are there macros or other steps I can take to compare column
A with column B, so that all entries in A that aren't in B wind up in column
C? Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default How to compare one column to another?

Hello

If your list in column A is from A1 to say A6 and list in B is from B1:B6
then enter the following in C1 and copy it down to C6

=IF(COUNTIF($B$1:$B$6,A1)0,"",A1)

Alok

"Jim Bancroft" wrote:

Hi everyone,

I have two columns of strings, both in ascending order. Similar lists but
not identical. Are there macros or other steps I can take to compare column
A with column B, so that all entries in A that aren't in B wind up in column
C? Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to compare one column to another?

Hi,

Unfortunately the columns don't have the same number of rows. What's more,
some entries in column A aren't in column B, and vice versa.


"Alok" wrote in message
...
Hello

If your list in column A is from A1 to say A6 and list in B is from B1:B6
then enter the following in C1 and copy it down to C6

=IF(COUNTIF($B$1:$B$6,A1)0,"",A1)

Alok

"Jim Bancroft" wrote:

Hi everyone,

I have two columns of strings, both in ascending order. Similar lists
but
not identical. Are there macros or other steps I can take to compare
column
A with column B, so that all entries in A that aren't in B wind up in
column
C? Thanks!





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default How to compare one column to another?

Hi Jim,

The formula does not require the same number of rows in columns A and B.
For instance your column A could be A1:A1000 and entries in B from B1:B500.
Then the formula in C1 will become

=IF(COUNTIF($B$1:$B$500,A1)0,"",A1)

but it will still need to be copied down till C1000.

Hence the column C must (in my solution) have the same number of rows as in
column A - though I have seen in this newsgroup solutions that ensure that
column C does not have blanks as in my solution but has only the missing
entries right at the top of the column.

Alok

"Jim Bancroft" wrote:

Hi,

Unfortunately the columns don't have the same number of rows. What's more,
some entries in column A aren't in column B, and vice versa.


"Alok" wrote in message
...
Hello

If your list in column A is from A1 to say A6 and list in B is from B1:B6
then enter the following in C1 and copy it down to C6

=IF(COUNTIF($B$1:$B$6,A1)0,"",A1)

Alok

"Jim Bancroft" wrote:

Hi everyone,

I have two columns of strings, both in ascending order. Similar lists
but
not identical. Are there macros or other steps I can take to compare
column
A with column B, so that all entries in A that aren't in B wind up in
column
C? Thanks!






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
compare data in column A with column B to find duplicates George Excel Discussion (Misc queries) 8 February 6th 09 03:53 PM
compare cells in column to criteria, then average next column cell Bradwin Excel Worksheet Functions 2 July 21st 08 08:37 PM
How do I compare string values in one column to another column? Nick N. Excel Worksheet Functions 1 April 29th 06 02:56 AM
Compare one Column to a Second Column Formula Help Needed jeffc Excel Worksheet Functions 1 April 13th 06 03:23 PM
compare data from one column with another and compare result to yet another Matt Williamson[_3_] Excel Programming 1 September 25th 03 08:54 PM


All times are GMT +1. The time now is 10:48 PM.

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

About Us

"It's about Microsoft Excel"