Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove duplicates Gazza Excel Discussion (Misc queries) 7 January 29th 10 05:33 PM
remove duplicates need help faceliftguide Setting up and Configuration of Excel 3 July 14th 09 02:27 PM
Remove duplicates Stanley Braverman Excel Programming 4 January 26th 09 07:01 PM
Remove duplicates Tuttamay77 Excel Discussion (Misc queries) 4 May 12th 06 10:56 PM
remove duplicates jeff quigley Excel Programming 1 June 9th 05 03:13 PM


All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"