![]() |
adding columns
I have a sheet that I basically need to summarise - however it has various
columns that need to be summarised eg. Checker. cases. overs.shorts amy .100.1.0 peter.25.2.3 jack.56.4.1 amy.10.3.6 I need to summarise to show: Checker. cases. overs.shorts amy.110.4.6 Thanks Claire |
adding columns
Hi,
You can use the SUMIF() function here =sumif(A1:A100,"amy",sum_range) -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Masterzan" wrote in message ... I have a sheet that I basically need to summarise - however it has various columns that need to be summarised eg. Checker. cases. overs.shorts amy .100.1.0 peter.25.2.3 jack.56.4.1 amy.10.3.6 I need to summarise to show: Checker. cases. overs.shorts amy.110.4.6 Thanks Claire |
adding columns
Public Sub ProcessData()
Dim i As Long, j As Long Dim LastRow As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To LastRow If Application.CountIf(.Columns("A"), .Cells(i, "A").Value) 1 Then For j = 2 To 4 .Cells(i, j).Value = Application.SumIf(.Columns("A"), ..Cells(i, "A").Value, .Columns(j)) Next j End If Next i For i = LastRow To 1 Step -1 If Application.CountIf(.Columns("A"), .Cells(i, "A").Value) 1 Then .Rows(i).Delete End If Next i End With End Sub -- __________________________________ HTH Bob "Masterzan" wrote in message ... I have a sheet that I basically need to summarise - however it has various columns that need to be summarised eg. Checker. cases. overs.shorts amy .100.1.0 peter.25.2.3 jack.56.4.1 amy.10.3.6 I need to summarise to show: Checker. cases. overs.shorts amy.110.4.6 Thanks Claire |
All times are GMT +1. The time now is 07:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com