mikesch236
New Member
- Joined
- Mar 5, 2015
- Messages
- 4
Hi all,
I've googled and searched for 2 days now but am not finding the answers I am looking for ...
I am trying to build a customer history list for a small bike shop. With each sale, the customer's name, address, invoice number, items bought etc. get automatically added to a sheet in the workbook.
Given that there are return customers, I need to build a macro that will find the duplicates and assign a unique customer ID to each individual customer - I do not want to delete duplicates (I've found snippets on how to do that) but need to keep all as the items bought will typically be different
sample data:
<tbody>
</tbody>
Rows 1, 2, 3, 4 and 7 are unique and need to get a unique ID (eg. incrementally counting up from 1). Rows 6, 8 and 9 are the same customer so all 3 need to be assigned the same unique ID (ID's would be eg. in column E)
Any ideas on how to do this? I am fairly new at VBA programming so don't know what all is possible.
Thanks for any help!
Mike
PS: sorry, using Win 8.1 (but target is Win7) and Excel 2013
I've googled and searched for 2 days now but am not finding the answers I am looking for ...
I am trying to build a customer history list for a small bike shop. With each sale, the customer's name, address, invoice number, items bought etc. get automatically added to a sheet in the workbook.
Given that there are return customers, I need to build a macro that will find the duplicates and assign a unique customer ID to each individual customer - I do not want to delete duplicates (I've found snippets on how to do that) but need to keep all as the items bought will typically be different
sample data:
Kd.Eintrag | Re.Nr. | Datum | Adresse 1 |
1 | 150229 | 20/02/2015 | Markus Vögl |
2 | 150264 | 24/02/2015 | Maria Beiwinkler-Stürzer |
3 | 150281 | 25/02/2015 | Franziska Schnell |
4 | 150294 | 26/02/2015 | Claudia Sahm |
5 | 150316 | 03/05/2015 | Mike Schroeder |
6 | 150315 | 03/05/2015 | Michaela Vollmer |
7 | 150317 | 03/05/2015 | Mike Schroeder |
8 | 150318 | 03/05/2015 | Mike Schroeder |
<tbody>
</tbody>
Rows 1, 2, 3, 4 and 7 are unique and need to get a unique ID (eg. incrementally counting up from 1). Rows 6, 8 and 9 are the same customer so all 3 need to be assigned the same unique ID (ID's would be eg. in column E)
Any ideas on how to do this? I am fairly new at VBA programming so don't know what all is possible.
Thanks for any help!
Mike
PS: sorry, using Win 8.1 (but target is Win7) and Excel 2013
Last edited: