AutoFilter In VBA - copy a record if cell appears in more than one other row

LukeAvedon

New Member
Joined
Apr 5, 2016
Messages
3
Hello,

I have a sheet codename "qm". There are rows of customer contact information. I need to be able to use autofilter to copy two types of records.

Is it possible to do this with Autofilter?

1.) The contacts in which this row represents the only contact at a company. (i.e. The company column (E) lists something like "Apple" no other rows list "Apple" in column (E). This row gets copied to sheet2

2.) Contacts where there are multiple people at one company. (i.e. This row lists the company in column(E) as something like "Microsoft" there are 6 other rows where "Microsoft" is listed as the company. All of these rows gets copied to sheet3.


Column E lists what companies the companies are at.

To be clear:

-->All the rows in which that contact is the only person at a company needs to be copied to one sheet. Column E is a unique value in the sheet. No other rows have that value in Column E.

-->All the rows in which the contact is one of many who work at a company need to be copied to another sheet. Column E is NOT a unique value in the sheet. Many other rows share the value in Column E. All of those rows need to be copied to another sheet.

Hope that makes sense!

Any help is greatly greatly appreciated. I'm not so good at AutoFilter.... but I have a hunch it's possible to do this... without writing a bunch of wacky loops.

Thanks!!!!!!!!

--Luke
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,215,398
Messages
6,124,688
Members
449,179
Latest member
kfhw720

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top