Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Sum duplicates unique values and delete dupliques

Hi,

my problem is that I have a list with duplicate entries and values attached
to them like this:

col a col b
12 2
12 3
14 5

I'm searching for a macro that would turn my list into this:

col a col b
12 5
14 5

Or like this:

col a col b col c
12 2 3
14 5

So if you could please help me, I would be very grateful!

Please respond also to my email because I have had
problems entering the community and finding spicific threads.

-Dave
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Sum duplicates unique values and delete dupliques

I prefer the latter

Public Sub ProcessData()
Dim i As Long
Dim iLastRow As Long

With ActiveSheet

iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 2 Step -1
If .Cells(i, "A").Value = .Cells(i - 1, "A").Value Then
.Cells(i, "B").Resize(, _
.Cells(i, .Columns.Count).End(xlToLeft).Column - 1).Copy
..Cells(i - 1, "C")
.Rows(i).Delete
End If
Next i

End With

End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Dave" wrote in message
...
Hi,

my problem is that I have a list with duplicate entries and values
attached
to them like this:

col a col b
12 2
12 3
14 5

I'm searching for a macro that would turn my list into this:

col a col b
12 5
14 5

Or like this:

col a col b col c
12 2 3
14 5

So if you could please help me, I would be very grateful!

Please respond also to my email because I have had
problems entering the community and finding spicific threads.

-Dave



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 to remove duplicates and combine their unique values? Dave Excel Discussion (Misc queries) 3 June 11th 07 07:51 AM
check for duplicates, then sum unique values Weissme Excel Discussion (Misc queries) 0 August 9th 06 04:35 PM
Count Unique Values In A Filtered Row with Duplicates jcpotwor Excel Discussion (Misc queries) 1 January 13th 06 01:02 AM
Count unique values among duplicates in a subtotal range jcpotwor Excel Discussion (Misc queries) 2 January 12th 06 01:29 PM
Duplicates - deleting to get just unique ones koncept New Users to Excel 3 August 24th 05 06:41 PM


All times are GMT +1. The time now is 06:20 AM.

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"