help with sumif formula

  • Thread starter Thread starter dksaluki
  • Start date Start date
D

dksaluki

Here is my column A (formated as a Date):
1-Oct
2-Oct
3-Oct
4-Oct
5-Oct
6-Oct
.....
....
Then in Column B i plug in the number of miles I ran. What i would
like to do is Sum column B if Column A contains "Oct", or "Sep",
etc.. How do i use the SumIf formula when Column A is formated as a
date? Looking for "...Oct" does not work for me.
 
Try this:

=SUMPRODUCT(--(TEXT(A1:A100,"mmm")="Oct"),B1:B100)

adjust the range to suit your data.

If you put Sep and Oct in cells, eg D1, D2, then the formula becomes:

=SUMPRODUCT(--(TEXT(A$1:A$100,"mmm")=D1),B$1:B$100)

and you can copy this down to pick up the other months on successive
rows.

Hope this helps.

Pete
 
Back
Top