help with sumif formula

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.
 
P

Pete_UK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top