rainbal
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 11/5/2010
-
Status: offline
|
Need a VBA script for excel
Friday, November 05, 2010 3:44 AM
( permalink)
Hi, I have 3 columns in excel Order # is unique Order # Customer # Product# hdf0898 1335 3695 ffdsf5656 1335 3695 I have 1000's of rows for different products I would like to find whether the same customer has bought the same product more than once if there a duplicate and i want that rows to be highlighted. if you have more suggestions to find how many times, it will be more helpful. Thanks in advance
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:Need a VBA script for excel
Friday, November 05, 2010 7:12 AM
( permalink)
So here is how I would do this if it were my problem to solve: Make a dictionary where the key is the customer id and the value is another dictionary. The second dictionary would have the key be a product ID and the value would be the number of times the customer had ordered that product. Here are some search terms to get you started: WScript.Dictionary Excel.Application
|
|
|
|
nov0798
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 11/19/2010
-
Status: offline
|
Re:Need a VBA script for excel
Friday, November 19, 2010 4:31 PM
( permalink)
|
|
|
|
hsreeves
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 4/14/2011
-
Status: offline
|
Re:Need a VBA script for excel
Thursday, November 17, 2011 4:00 AM
( permalink)
My suggestion doesn't use VB or VBA, but rather a built in Excel capability... I would simply establish a filter on the header row and then filter on the customer ID, sorting by Product number. The built-in Total, Average and other functions still work in this mode as do the charting functions.
<message edited by hsreeves on Thursday, November 17, 2011 4:02 AM>
|
|
|
|