C
catlair
Hi,
Am trying to get my little macro to search for a particular month in a
particular year and match it with a criteria before providing a total.
For example, am searching under column A for "Jun=06" then matching it
with "S/W" before summing up with the total figure.
My macro:
Dim iDataRows As Long
iDataRows = WorksheetFunction.CountA(Range("A:A"))
Dim iAddLines As Long
iAddLines = iDataRows
BanRangeA = iAddLines + 5
Range("A" & BanRangeA).Select
ActiveCell.Formula = "=SUMPRODUCT(--(DATE(" & "A2:A" & iDataRows &
"=""Jun-06"")),--(" & "F2:F" & iDataRows & "=""S/W""))"
Please advise. Thanks!
Am trying to get my little macro to search for a particular month in a
particular year and match it with a criteria before providing a total.
For example, am searching under column A for "Jun=06" then matching it
with "S/W" before summing up with the total figure.
My macro:
Dim iDataRows As Long
iDataRows = WorksheetFunction.CountA(Range("A:A"))
Dim iAddLines As Long
iAddLines = iDataRows
BanRangeA = iAddLines + 5
Range("A" & BanRangeA).Select
ActiveCell.Formula = "=SUMPRODUCT(--(DATE(" & "A2:A" & iDataRows &
"=""Jun-06"")),--(" & "F2:F" & iDataRows & "=""S/W""))"
Please advise. Thanks!