PC Review


Reply
Thread Tools Rate Thread

comparing 2 sheets and list unique and duplicate rows

 
 
lejahja@hotmail.com
Guest
Posts: n/a
 
      23rd Mar 2007
Hi,

I'm fairly new to macro programming and I'm hoping someone could help
me. I tried searching this group but I got a bit confused with some of
the programs and hoping that there is one that is someone closer to my
scenario.

What I have is 2 sheets, sheet 1 and sheet 2. Both sheets have the
same columns. A = customer name, B = customer address, C = customer
phone number.

What I want to do is come up with 2 lists, where one is showing all
the customers that are unique to sheet 2. This is to be written to
sheet 3. The other list to show all customers that are the same in
sheet 2 as sheet 1. This is to be written to sheet 4.

Both sheet 3 and 4 also has columns A = customer name, B = customer
address, C = customer phone number.

For comparison in sheet 1 and 2, I would like to use customer name
(column A).

What would the macro look like? Thanks in advance.

 
Reply With Quote
 
 
 
 
matt
Guest
Posts: n/a
 
      23rd Mar 2007
On Mar 22, 7:47 pm, leja...@hotmail.com wrote:
> Hi,
>
> I'm fairly new to macro programming and I'm hoping someone could help
> me. I tried searching this group but I got a bit confused with some of
> the programs and hoping that there is one that is someone closer to my
> scenario.
>
> What I have is 2 sheets, sheet 1 and sheet 2. Both sheets have the
> same columns. A = customer name, B = customer address, C = customer
> phone number.
>
> What I want to do is come up with 2 lists, where one is showing all
> the customers that are unique to sheet 2. This is to be written to
> sheet 3. The other list to show all customers that are the same in
> sheet 2 as sheet 1. This is to be written to sheet 4.
>
> Both sheet 3 and 4 also has columns A = customer name, B = customer
> address, C = customer phone number.
>
> For comparison in sheet 1 and 2, I would like to use customer name
> (column A).
>
> What would the macro look like? Thanks in advance.


I don't think that you actually need a macro to do this. Do you know
how the vlookup function works in Excel? If you don't know how it
works search the Excel help for "vlookup" and work through the
examples. When referencing the table parameter, I would recommend
using absolute references with the vlookup funciton.

If you are looking for a way to learn VBA then this problem could be a
good starter because at first glance it would seem to me like it is a
good candidate for arrays. If you want more on how to do the VBA then
state so; otherwise, vlookups would be much faster.

Matt

 
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
Comparing data in mult rows then summing unique values Cathy Landry Microsoft Excel Misc 2 17th Mar 2009 11:27 PM
How to convert duplicate rows into unique rows in a Table? KK Microsoft Access Queries 2 7th May 2008 02:40 PM
Re: comparing identical rows in different sheets Brian Madsen Microsoft Excel Programming 2 19th Sep 2004 10:34 AM
comparing identical rows in different sheets Brian Madsen Microsoft Excel Programming 0 19th Sep 2004 09:24 AM
Comparing rows in three sheets wing Microsoft Excel Programming 0 30th Apr 2004 05:07 PM


Features
 

Advertising
 

Newsgroups
 


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