ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   =SUMIF(B2:B13,"=Jan",C2:C13) (https://www.excelbanter.com/excel-discussion-misc-queries/10101-%3Dsumif-b2-b13-%22%3Djan%22-c2-c13.html)

a921

=SUMIF(B2:B13,"=Jan",C2:C13)
 
I'm looking to use the "sumif" formula listed above.
However my data lists Jan-03 and Jan-04. How do I account
for the years in the above formula? Thanks in advance!!

Myrna Larson

If you want to sum January for both years and the data is actual text, not the
date Jan 1, 2003, formatted to show Jan-03,

=SUMIF(B2:B13,"Jan*",C2:C13)

note the wildcard.


On Wed, 26 Jan 2005 13:48:14 -0800, "a921"
wrote:

I'm looking to use the "sumif" formula listed above.
However my data lists Jan-03 and Jan-04. How do I account
for the years in the above formula? Thanks in advance!!



Rob van Gelder

=SUMPRODUCT(--(MONTH(B2:B13)=1), C2:C13)

For a good article on advanced uses of SUMPRODUCT:
www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"a921" wrote in message
...
I'm looking to use the "sumif" formula listed above.
However my data lists Jan-03 and Jan-04. How do I account
for the years in the above formula? Thanks in advance!!




Aladin Akyurek

If you only would want to pick up Jan-values of a certain year (say,
2004) and B2:B13 houses true dates...

In D2 enter: 1-Jan-2004

In E2 enter:

=DATE(YEAR(D2),MONTH(D2)+1,0)

then invoke:

=SUMIF(B2:B13,"="&D2,C2:C13)-SUMIF(B2:B13,""&E2,C2:C13)

a921 wrote:
I'm looking to use the "sumif" formula listed above.
However my data lists Jan-03 and Jan-04. How do I account
for the years in the above formula? Thanks in advance!!


Naz

Unfortunately there is no way of changing the Autofilter colour.

Hope that helps

__________________
Naz
London

"Aladin Akyurek" wrote:

If you only would want to pick up Jan-values of a certain year (say,
2004) and B2:B13 houses true dates...

In D2 enter: 1-Jan-2004

In E2 enter:

=DATE(YEAR(D2),MONTH(D2)+1,0)

then invoke:

=SUMIF(B2:B13,"="&D2,C2:C13)-SUMIF(B2:B13,""&E2,C2:C13)

a921 wrote:
I'm looking to use the "sumif" formula listed above.
However my data lists Jan-03 and Jan-04. How do I account
for the years in the above formula? Thanks in advance!!



Naz

whoops wrong post

"Naz" wrote:

Unfortunately there is no way of changing the Autofilter colour.

Hope that helps

__________________
Naz
London

"Aladin Akyurek" wrote:

If you only would want to pick up Jan-values of a certain year (say,
2004) and B2:B13 houses true dates...

In D2 enter: 1-Jan-2004

In E2 enter:

=DATE(YEAR(D2),MONTH(D2)+1,0)

then invoke:

=SUMIF(B2:B13,"="&D2,C2:C13)-SUMIF(B2:B13,""&E2,C2:C13)

a921 wrote:
I'm looking to use the "sumif" formula listed above.
However my data lists Jan-03 and Jan-04. How do I account
for the years in the above formula? Thanks in advance!!




All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com