PC Review


Reply
Thread Tools Rate Thread

Compare two worksheets for missing information

 
 
Naba via OfficeKB.com
Guest
Posts: n/a
 
      6th Jul 2006
Hi all,

Recently i was given an excel workbook with two worksheet, both contain the
same data up a 10000 records each, i want to compare the two work sheets and
than copy the missing data to another worksheet using macro, if anyone can
help me with this please i would be grateful.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200607/1
 
Reply With Quote
 
 
 
 
Nick Hodge
Guest
Posts: n/a
 
      6th Jul 2006
Naba

Use a VLOOKUP function on each set of data, like

=VLOOKUP(A2,Sheet2!$A$1:$A$10000,1,FALSE)

and then any #N/A errors will be where data does not exist in the lookup
table (In this case A1:A10000)

You can then autofilter and copy the data elsewhere, repeat for the other
data

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(E-Mail Removed)HIS


"Naba via OfficeKB.com" <u23570@uwe> wrote in message
news:62d40bec186bf@uwe...
> Hi all,
>
> Recently i was given an excel workbook with two worksheet, both contain
> the
> same data up a 10000 records each, i want to compare the two work sheets
> and
> than copy the missing data to another worksheet using macro, if anyone
> can
> help me with this please i would be grateful.
>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.a...tions/200607/1



 
Reply With Quote
 
Naba via OfficeKB.com
Guest
Posts: n/a
 
      7th Jul 2006
Nick Hodge wrote:
>Naba
>
>Use a VLOOKUP function on each set of data, like
>
>=VLOOKUP(A2,Sheet2!$A$1:$A$10000,1,FALSE)
>
>and then any #N/A errors will be where data does not exist in the lookup
>table (In this case A1:A10000)
>
>You can then autofilter and copy the data elsewhere, repeat for the other
>data
>
>--
>HTH
>Nick Hodge
>Microsoft MVP - Excel
>Southampton, England
>www.nickhodge.co.uk
>(E-Mail Removed)
>
>> Hi Nick,
>>

>Thanks but i still can't work out what's happening,i'm a newbbie, tried what you said but all i have is NA s on all my data,which means all my dat is missing.


My books is has two sheets with data, something like this;

Sheet1
A B C D
--------------------------------------------------
1 1001 Joe 02/02/06 M
2 1002 Sammy 04/08/05 F
3 1005 Kila 05/05/03 F
4 1004 Beth 11/06/05 F

Sheet2
A B C D
--------------------------------------------------
1 1001 Joe 02/02/06 M
2 1002 Sammy 04/08/05 F
3 1005 Kila 05/05/03 F
4 1003 Bob 02/06/02 M

i kind of want to extact the data thats not on sheet1 or sheet2 to sheet3,
something like this:
Sheet3
A B C D
--------------------------------------------------
1 1004 Beth 11/06/05 F
2 1003 Bob 02/06/02 M

>> can you help or any one help please...
>> Thanks, i'd he gratefull.....


--
Message posted via http://www.officekb.com
 
Reply With Quote
 
Nick Hodge
Guest
Posts: n/a
 
      7th Jul 2006
Naba

The theory still holds. (Using your example), in Sheet1 E1 enter

=VLOOKUP(A1,Sheet2!$A$1:$A$10000,1,FALSE)

This presumes your sheet2 is actually called Sheet2

The repeat on Sheet2 replacing the Sheet2 reference with Sheet1 in the
formula

If this returns all #N/As then almost certainly other ways would do the same
as the data does not 'match'. This can be caused by invisible characters in
the data or one set of data being 'text', while the others are 'numbers',
although they may look the same.

If you still have problems get back

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(E-Mail Removed)HIS


"Naba via OfficeKB.com" <u23570@uwe> wrote in message
news:62dcb54058041@uwe...
> Nick Hodge wrote:
>>Naba
>>
>>Use a VLOOKUP function on each set of data, like
>>
>>=VLOOKUP(A2,Sheet2!$A$1:$A$10000,1,FALSE)
>>
>>and then any #N/A errors will be where data does not exist in the lookup
>>table (In this case A1:A10000)
>>
>>You can then autofilter and copy the data elsewhere, repeat for the other
>>data
>>
>>--
>>HTH
>>Nick Hodge
>>Microsoft MVP - Excel
>>Southampton, England
>>www.nickhodge.co.uk
>>(E-Mail Removed)
>>
>>> Hi Nick,
>>>

>>Thanks but i still can't work out what's happening,i'm a newbbie, tried
>>what you said but all i have is NA s on all my data,which means all my dat
>>is missing.

>
> My books is has two sheets with data, something like this;
>
> Sheet1
> A B C D
> --------------------------------------------------
> 1 1001 Joe 02/02/06 M
> 2 1002 Sammy 04/08/05 F
> 3 1005 Kila 05/05/03 F
> 4 1004 Beth 11/06/05 F
>
> Sheet2
> A B C D
> --------------------------------------------------
> 1 1001 Joe 02/02/06 M
> 2 1002 Sammy 04/08/05 F
> 3 1005 Kila 05/05/03 F
> 4 1003 Bob 02/06/02 M
>
> i kind of want to extact the data thats not on sheet1 or sheet2 to
> sheet3,
> something like this:
> Sheet3
> A B C D
> --------------------------------------------------
> 1 1004 Beth 11/06/05 F
> 2 1003 Bob 02/06/02 M
>
>>> can you help or any one help please...
>>> Thanks, i'd he gratefull.....

>
> --
> Message posted via http://www.officekb.com



 
Reply With Quote
 
Naba via OfficeKB.com
Guest
Posts: n/a
 
      7th Jul 2006
Nick Hodge wrote:
>Naba
>
>The theory still holds. (Using your example), in Sheet1 E1 enter
>
>=VLOOKUP(A1,Sheet2!$A$1:$A$10000,1,FALSE)
>
>This presumes your sheet2 is actually called Sheet2
>
>The repeat on Sheet2 replacing the Sheet2 reference with Sheet1 in the
>formula
>
>If this returns all #N/As then almost certainly other ways would do the same
>as the data does not 'match'. This can be caused by invisible characters in
>the data or one set of data being 'text', while the others are 'numbers',
>although they may look the same.
>
>If you still have problems get back
>
>>Nick


>Thanks Very much nick, you genus.


>>>> Thanks, Nick mate.....


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200607/1
 
Reply With Quote
 
Naba via OfficeKB.com
Guest
Posts: n/a
 
      7th Jul 2006
Nick Hodge wrote:
>Naba
>
>The theory still holds. (Using your example), in Sheet1 E1 enter
>
>=VLOOKUP(A1,Sheet2!$A$1:$A$10000,1,FALSE)
>
>This presumes your sheet2 is actually called Sheet2
>
>The repeat on Sheet2 replacing the Sheet2 reference with Sheet1 in the
>formula
>
>If this returns all #N/As then almost certainly other ways would do the same
>as the data does not 'match'. This can be caused by invisible characters in
>the data or one set of data being 'text', while the others are 'numbers',
>although they may look the same.
>
>If you still have problems get back
>
>>Nick


>Thanks Very much nick, you genus.


>>>> Thanks, Nick mate.....


--
Message posted via http://www.officekb.com
 
Reply With Quote
 
Nick Hodge
Guest
Posts: n/a
 
      7th Jul 2006
No problem...glad it helped

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(E-Mail Removed)HIS


"Naba via OfficeKB.com" <u23570@uwe> wrote in message
news:62e1076649659@uwe...
> Nick Hodge wrote:
>>Naba
>>
>>The theory still holds. (Using your example), in Sheet1 E1 enter
>>
>>=VLOOKUP(A1,Sheet2!$A$1:$A$10000,1,FALSE)
>>
>>This presumes your sheet2 is actually called Sheet2
>>
>>The repeat on Sheet2 replacing the Sheet2 reference with Sheet1 in the
>>formula
>>
>>If this returns all #N/As then almost certainly other ways would do the
>>same
>>as the data does not 'match'. This can be caused by invisible characters
>>in
>>the data or one set of data being 'text', while the others are 'numbers',
>>although they may look the same.
>>
>>If you still have problems get back
>>
>>>Nick

>
>>Thanks Very much nick, you genus.

>
>>>>> Thanks, Nick mate.....

>
> --
> Message posted via http://www.officekb.com



 
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
Need to compare 2 worksheets... =?Utf-8?B?Qm9ubmll?= Microsoft Excel Misc 3 2nd Dec 2008 11:06 AM
Compare Rows on different Worksheets and Output Difference's to other Worksheets. dids72@gmail.com Microsoft Excel Programming 3 19th Sep 2007 04:48 PM
Compare two worksheets rageon75 Microsoft Excel New Users 5 24th Feb 2006 05:01 PM
Compare worksheets praveen_khm Microsoft Excel Worksheet Functions 0 17th Jan 2006 05:54 PM
Compare worksheets and generate list of missing data? =?Utf-8?B?TWludWV0dGU=?= Microsoft Excel Worksheet Functions 4 3rd Nov 2005 01:37 PM


Features
 

Advertising
 

Newsgroups
 


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