YTD SUMIF excluding SOME blanks & zeros

kelstar

New Member
Joined
Feb 27, 2011
Messages
11
Hi all, I am trying to do a SUMIF so that YTD for last year matches this year.
So in this example I want the SUM of Jan/Feb 2018 vs SUM of Jan/Feb 2017 to show in my totals at the bottom.
I have a formula that works except it falls apart when I have a zero for a month that should be included (like Jan in this example)
This is what I have
=SUMIF(C14:C25,B14:B25,"<>"&""&0)
So total for 2017 is showing as 1 when it should be 7.
I've tried everything I can think of to fix it! Any help would be appreciated!
Apologies work browser settings won't allow me to copy / paste properly.
The figures for 2018 are B14:B25 and 6 for 2017 is C14:C25 if that helps.

BOOKINGS
20182017
JAN06
FEB41
MAR01
APR00
MAY03
JUN01
JUL00
AUG02
SEP00
OCT01
NOV03
DEC03
TOTAL41
YTD +/-

<tbody>
</tbody>
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
=SUMIF(C14:C25,"<>0",B14:B15)

is the correct syntax for a hard coded condition


Forget what I said before, you want YTD.
 
Last edited:
Upvote 0
This does it:


Excel 2010
ABC
1BOOKINGS
220182017
3JAN06
4FEB41
5MAR01
6APR00
7MAY03
8JUN01
9JUL00
10AUG02
11SEP00
12OCT01
13NOV03
14DEC03
15TOTAL41
167
Sheet6
Cell Formulas
RangeFormula
C16=SUMPRODUCT(--(MONTH($A$3:$A$14&1)<=2)*$C$3:$C$14)


where 2 is the month number
 
Last edited:
Upvote 0
Hi,

Assuming your Column A Months are Text and Not Real Date values, And you want a running YTD as each month passes, modification to Sheetspread's formula:


Book1
ABC
12BOOKINGS
1320182017
14JAN06
15FEB41
16MAR01
17APR00
18MAY03
19JUN01
20JUL00
21AUG02
22SEP00
23OCT01
24NOV03
25DEC03
26TOTAL47
Sheet45
Cell Formulas
RangeFormula
B26=SUMPRODUCT((MONTH($A14:$A25&1)TODAY()))*B14:B25)


B26 formula copied to C26.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,666
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top