Hmm, getting there.
So my steps were, open the document, open developer vba, ran the code, looked in Sheet2, created a button, assigned the macro, filtered Address 1 A-Z, ran the code.
Now, when I filter by Address1, it still shows two 0000's and a 5001, I thought it would delete it? (or notify me that it would be deleted like a previous version of code)
A 100704-001 company ABC 10324 152A ST 0000 A 101121-001 company ABC 10324 152A ST 5001 A 101154-000 company ABC 10324 152A ST 0000
End result would still want to be 1 line though, so those 3 would be 1, but put into their proper columns..
I might be a bit confused.
If the address is the same for any accounts, consolidate on 1 line. (consolidate meaning, find the other account #'s with same address, and put into the applicable column based on price code)
If the address is different than any other account then it can stay on a line by itself.
One objective of this is for direct (snail) mailing promo's out to our customers, if we have 15 accounts with the same address, then we only need to send 1 promo out, except it would appear right now that we need to send 15.
Second objective of this is for e-mailing promos out to our customers, if we have 15 accounts with the same address, then the emails will be the same also, (I export these emails and will put into this database at a later time).
- side note for emails, depending on the input, maybe 1 of 15 accounts has an email associated with it, so if we picked #4 of 15, there may not be an email there, so if this was all on 1 line, they would have an email associated with it, even though it was only entered for 1 account.
- I can then backwards import those emails/contact names back into the database where I exported this, and it's up to date, so all 15 will have the same info.
Does that clarify? I didn't notice snb's code deleting anything, but if it does, then yes it is not useful in this application.