Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi again!
I have a list which contains duplicates and values attached to every entry. Like this: col a col b 0 5 0 11 1 7 2 5 .... And I would like to make the list look like this: col a col b 0 16 1 12 .... So, how to do this? Please I need your help! -Dave |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit Dim i As Long Dim iLastRow As Long Dim cell As Range Dim sh As Worksheet With ActiveSheet Application.ScreenUpdating = False 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 - 1, "B").Value = .Cells(i - 1, "B").Value + _ .Cells(i, "B").Value .Rows(i).Delete End If Next i Application.ScreenUpdating = True 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 again! I have a list which contains duplicates and values attached to every entry. Like this: col a col b 0 5 0 11 1 7 2 5 ... And I would like to make the list look like this: col a col b 0 16 1 12 ... So, how to do this? Please I need your help! -Dave |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On a new sheet, try Data Consolidate, select the table reference
with the options "Sum" and labels in "Left Column" then click OK. On 6 Jun, 08:45, Dave wrote: Hi again! I have a list which contains duplicates and values attached to every entry. Like this: col a col b 0 5 0 11 1 7 2 5 ... And I would like to make the list look like this: col a col b 0 16 1 12 ... So, how to do this? Please I need your help! -Dave |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you both for your help! Both solutions work just fine!
-Dave "Lori" wrote: On a new sheet, try Data Consolidate, select the table reference with the options "Sum" and labels in "Left Column" then click OK. On 6 Jun, 08:45, Dave wrote: Hi again! I have a list which contains duplicates and values attached to every entry. Like this: col a col b 0 5 0 11 1 7 2 5 ... And I would like to make the list look like this: col a col b 0 16 1 12 ... So, how to do this? Please I need your help! -Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I want to combine 2 workbook data bases and remove duplicates | Excel Discussion (Misc queries) | |||
check for duplicates, then sum unique values | Excel Discussion (Misc queries) | |||
Count Unique Values In A Filtered Row with Duplicates | Excel Discussion (Misc queries) | |||
Count unique values among duplicates in a subtotal range | Excel Discussion (Misc queries) | |||
Extract Unique Values, Then Extract Again to Remove Suffixes | Excel Discussion (Misc queries) |