![]() |
comparing 2 sheets and list unique and duplicate rows
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. |
comparing 2 sheets and list unique and duplicate rows
On Mar 22, 7:47 pm, 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 |
All times are GMT +1. The time now is 12:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com