I have modified it to work for Columns G and O. It is in the attached spreadsheet.
As stated earlier I borrowed the original macro from Andrew Poulsom on: http://www.mrexcel.com/forum/excel-q...cate-rows.html
When it come to excel and macro's I know enough to be dangerous. I don't know enough to even begin explaining how it works. Sorry 
Sub Combine()
Dim Sh As Worksheet
Dim LastRow As Long
Dim Rng As Range
Range("o1").Copy Range("p1")
Set Sh = ActiveSheet
Sh.Columns(16).Insert
LastRow = Sh.Range("g65536").End(xlUp).Row
With Sh.Range("g1:g" & LastRow).Offset(0, 9)
.FormulaR1C1 = "=IF(COUNTIF(R1C[-9]:RC[-9],RC[-9])>1,"""",SUMIF(R1C[-9]:R[" & LastRow & "]C[-9],RC[-9],R1C[-1]:R[" & LastRow & "]C[-1]))"
.Value = .Value
End With
Sh.Columns(15).Delete
Sh.Rows(1).Insert
Set Rng = Sh.Range("o1:o" & LastRow + 1)
With Rng
.AutoFilter Field:=1, Criteria1:="="
.SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
Range("p1").Cut Range("o1")
End Sub
Bookmarks