![]() |
De-Dupe Records Based on Two Fields.
I've got 5 coumns, of data : Company, Address, C_S_Z, Phone, Fax : and about 600 rows of companies. Since some Comapnies share the same name I need a Macro that can de-dupe based on two fields.. preferably Company and Address. The Current de-dupe macro i use works. but only for one field :( Any help would be amazing!!!!.. -- onlythebest ------------------------------------------------------------------------ onlythebest's Profile: http://www.excelforum.com/member.php...o&userid=36301 View this thread: http://www.excelforum.com/showthread...hreadid=562132 |
De-Dupe Records Based on Two Fields.
"onlythebest" wrote
in message ... I've got 5 coumns, of data : Company, Address, C_S_Z, Phone, Fax : and about 600 rows of companies. Since some Comapnies share the same name I need a Macro that can de-dupe based on two fields.. preferably Company and Address. The Current de-dupe macro i use works. but only for one field :( Any help would be amazing!!!!.. Try joining the respective strings together with "&". Your current macro probably does some kind of comparison of one string against another. Instead of comparing one string to another, compare two strings joined with "&" (which makes one string). Tough to describe without your code. Let's say Company Name is in column A and Address is in column B. Maybe your code reads: If A2 = A1 Then Range("A2").EntireRow.Delete End If Try this: If A2&B2 = A1&B1 Then Range("A2").EntireRow.Delete End If Curious if that does it for you... - Bill |
De-Dupe Records Based on Two Fields.
:( ............ -- onlythebest ------------------------------------------------------------------------ onlythebest's Profile: http://www.excelforum.com/member.php...o&userid=36301 View this thread: http://www.excelforum.com/showthread...hreadid=562132 |
All times are GMT +1. The time now is 11:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com