View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jip jip is offline
external usenet poster
 
Posts: 8
Default Contraction of rows

Platform: Windows 2000/Excel 2000


Is there anybody out here who is able to help me solving following
Excel-case:

I have an Excel-price file consists of approximately 4000 rows and 6
columns,

First column consist of consecutive numbers each usual attached/connected
with a price (the price can be the same but not necessarily).

I need to make a macro/VB-code which can do following job:

If a number occur more than once (as for instance 101075 or 101078, shown in
the example down under) the macro/VB-code shall replace all repetition-rows
with only one row, but same time add. the prices belonging to the same
number..hope this explanation makes it clear????


Example

Before change:

Number Price
101074 2000
101075 5412
101075 243
101075 8492
101076 105531
101077 244
101078 5456
101078 81512

After the change has been implemented:

Number Price
101074 2000
101075 14147
101076 105531
101077 244
101078 86968

I am looking forward that you are able to help.

JIP