View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Henrietta Horne Henrietta Horne is offline
external usenet poster
 
Posts: 15
Default UDF to merge duplicate rows

On Wed, 12 Jan 2011 03:00:53 +0100, "Charabeuh"
wrote:

Hello,

Another way without VBA:

I assumed your data are in columns A,B,C
(e.g. Word,Score,Index <== A1 to C10000)

Select an empty cell on your sheet ( e.g. cell F1)
Select in your menu 'Data' the command 'Consolidate'
Into the windows:
- select in the list function "Sum"
- select in the textbox "Référence" the area of your data to sum
(i.e. A1:B10000)
- click 'Add'
- then select the option 'Top row' and 'Left column')
- clic 'OK'

You will get a table with the sum of score.

Into cell F2, put the following formula to get your index:
=MAX(FIND(MID(F2,ROW(INDIRECT("1:" &
LEN(F2))),1),"etaoinsrhldcumgfpwybvkjxzq-"))
(this is an array formula, you should validate this formula with the three
keys CTRL+SHIFT+Enter instead of the single key Enter)

Then drag down this formula to the end of your consolidated data.


Thanks. I'll look into this solution, too.