Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dannix54
 
Posts: n/a
Default How do I Compare worksheet columns

I have two worksheets; One with the names (last, first) of last years
employees,
The second with the current employee list (last, first). I need to compare
the two lists and display a list of employees NOT on the current list. "who's
not with us anymore". Can anyone help? Thanks.
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi

Check out Chip Pearson's page on working with duplicates at
http://www.cpearson.com/excel/duplicat.htm

the article you're after is right down the bottom of the page, but you also
might find some other useful things along the way.

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"dannix54" wrote in message
...
I have two worksheets; One with the names (last, first) of last years
employees,
The second with the current employee list (last, first). I need to compare
the two lists and display a list of employees NOT on the current list.
"who's
not with us anymore". Can anyone help? Thanks.



  #3   Report Post  
Max
 
Posts: n/a
Default

Here's one crack at this ..

Assume data below is in sheet: Current,
cols A to B, data from row2 down

Fname Lname
Durell Joe
Lowre Peter
Factor Max
Martin Peters

and this data below is in sheet: Last,
cols A to B, data from row2 down

Fname Lname
Martin Peters
Marsh Betty
Durell Joe
Polar Rich
Factor Max

Using an empty col to the right, say col C?

Put in C2's formula bar and array-enter (Press CTRL+SHIFT+ENTER) :
=IF(TRIM(A2&"_"&B2)="","",IF(ISNUMBER(MATCH(A2&"_" &B2,Current!$A$2:$A$100&"_
"&Current!$B$2:$B$100,0)),"",ROW()))

Copy C2 down as many rows as there is data in cols A and B

In a new sheet: Results
----------------------
Copy Paste the same col headers into A1:E1

Put in A2:
=IF(ISERROR(SMALL(Last!$C:$C,ROWS($A$1:A1))),"",IN DEX(Last!A:A,MATCH(SMALL(L
ast!$C:$C,ROWS($A$1:A1)),Last!$C:$C,0)))

Copy across to B2, fill down by as many rows as was done in "Last"

"Result" will return all the rows from "Last"
whose data do not match those in "Current"
(returned rows will be bunched at the top)

For the sample data above, you'll get:

Fname Lname
Marsh Betty
Polar Rich
(rest are "blank" rows)

Adapt to suit ..

A sample file for the above is available at:
http://flypicture.com/p.cfm?id=41449
(right-click on link "Download File" at the top)
File: dannix54_wksht.xls

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"dannix54" wrote in message
...
I have two worksheets; One with the names (last, first) of last years
employees,
The second with the current employee list (last, first). I need to compare
the two lists and display a list of employees NOT on the current list.

"who's
not with us anymore". Can anyone help? Thanks.



  #4   Report Post  
Max
 
Posts: n/a
Default

Correction to array formula in C2 in "Last"
Use instead in C2:
=IF(ISNUMBER(MATCH(A2&"_"&B2,Current!$A$2:$A$100&" _"&Current!$B$2:$B$100,0))
,"",ROW())

Corrected sample at: http://flypicture.com/p.cfm?id=41454
(right-click on link "Download File" at the top)
File: dannix54_wksht1.xls
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #5   Report Post  
Max
 
Posts: n/a
Default

Re-corrected sample at:
http://flypicture.com/p.cfm?id=41496
(right-click on link "Download File" at the top)
File: dannix54_wksht11.xls

(Formulas in "Results" need not be array-entered,
just normal ENTER will do)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #6   Report Post  
Dannix54
 
Posts: n/a
Default

Hello Max,
The results in my worksheet are yeilding your sample results, not the
results from the collumn compare. Do I need to change the formula in any way?
Thank you,
Dan

"Max" wrote:

Re-corrected sample at:
http://flypicture.com/p.cfm?id=41496
(right-click on link "Download File" at the top)
File: dannix54_wksht11.xls

(Formulas in "Results" need not be array-entered,
just normal ENTER will do)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----



  #7   Report Post  
Max
 
Posts: n/a
Default

Of course you would need to adapt to suit what you actually have <g

Maybe email over a copy of your file, I'll take a look

You can email to either:
demechanik <atyahoo<dotcom, or
xdemechanik <atyahoo<dotcom
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Dannix54" wrote in message
...
Hello Max,
The results in my worksheet are yeilding your sample results, not the
results from the collumn compare. Do I need to change the formula in any

way?
Thank you,
Dan



  #8   Report Post  
Max
 
Posts: n/a
Default

File with implemented suggestion returned to OP:

Range in formula in col C in "Last" was adapted to suit the extent of the
data that was in "Current", i.e. used:

Current!$A$2:$A$2042&"_"&Current!$B$2:$B$2042
(as the last row of data in Current was row 2042)

instead of:
Current!$A$2:$A$100&"_"&Current!$B$2:$B$100

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #9   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

Suppose you have thelist of previous years employees in range A1:A2 and a
list of the current years employees in range B1:B2. In C1, array enter
(Ctrl+Shift+Enter) the following formula

=IF(OR(A1=$B$1:$B$2),A1,"Not in list")

Regards,

Ashish Mathur

"dannix54" wrote:

I have two worksheets; One with the names (last, first) of last years
employees,
The second with the current employee list (last, first). I need to compare
the two lists and display a list of employees NOT on the current list. "who's
not with us anymore". Can anyone help? 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
Excel Compare values in columns & display missing values in a new cpetta Excel Discussion (Misc queries) 1 April 2nd 05 05:51 AM
How do I copy a link that is in columns to another worksheet down. Bolynx Excel Discussion (Misc queries) 1 March 30th 05 09:15 PM
can you prevent viewing of specific columns in a worksheet Tamara Excel Worksheet Functions 1 January 19th 05 04:12 PM
Compare Columns Michael Nesi Excel Discussion (Misc queries) 1 December 6th 04 08:45 PM
compare columns of different worksheets Classic Excel Discussion (Misc queries) 2 December 2nd 04 10:09 PM


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