Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove duplicates
Hi
I have an array of datastructures with 3 elements: ID, sum and accountnumber: Type Bill ID as String Price as Long accountnumber as string End Type Public Bills(200) as Bill The accountnumbers are not unique per ID, several ID's can have the same accountnumber. I need to write a list on a sheet with accountnumber in one column and the sum of prices connected to that accountnumber in the next column. Is there a smart way of doing this? My first thought was som kind of nested loops, but it will be quite ugly, and I could not really get my head around it. Second thought is using the sheet as a kind of draft, writing the list of accountnumbers down a column, an then use the function RemoveDuplicates to get the unique accountnumbers. Next read them in to a datastructure with accountnumbers and price. At last a nested loop going through the list of unique numbers in the outer loop and the list Bills as the inner loop. There must be a better way. Hope someone sees it :-) Best regards -- Jesper Kaas - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I remove duplicates | Excel Discussion (Misc queries) | |||
remove duplicates need help | Setting up and Configuration of Excel | |||
Remove duplicates | Excel Programming | |||
Remove duplicates | Excel Discussion (Misc queries) | |||
remove duplicates | Excel Programming |