Hi,
I have a macro to sumif between column D and E to Column I and J.
I need to add more columns. D, E F,G,H to sumif to column I,J,K,L,M,N.
Option Explicit
Sub Sumiff()
Dim i As Integer
Dim lrow As Integer
lrow = Range("i16000").End(xlUp).row
For i = 2 To lrow
Range("j" & i).Value = Application.WorksheetFunction.Sumif(Range("d:d"), Range("i" & i), Range("e:e"))
Next i
Dim rng As Range
Set rng = Range("i1:j20")
With rng
.Font.Bold = True
.Font.Color = vbBlue
End With
End Sub
I have a macro to sumif between column D and E to Column I and J.
I need to add more columns. D, E F,G,H to sumif to column I,J,K,L,M,N.
Option Explicit
Sub Sumiff()
Dim i As Integer
Dim lrow As Integer
lrow = Range("i16000").End(xlUp).row
For i = 2 To lrow
Range("j" & i).Value = Application.WorksheetFunction.Sumif(Range("d:d"), Range("i" & i), Range("e:e"))
Next i
Dim rng As Range
Set rng = Range("i1:j20")
With rng
.Font.Bold = True
.Font.Color = vbBlue
End With
End Sub