Conditional sumif

G

Guest

In my budget comparison worksheet, I need to compare CYTD to PTYD totals and
would like to write conditional sumif that totals PYTD based on the month
(i.e, total A1:A1 if mo. = 1, total A1:B1 of mo. =2, A1:C1 if mo.=3 and so
on). Thank you.
 
B

Bob Umlas

=SUM(A1:OFFSET(A1,0,0,1,mo.))
assuming "mo." is the defined name, otherwise you can use the MONTH function
of the cell containing the date (if the date is in Z1, for example,
=SUM(A1:OFFSET(A1,0,0,1,MONTH(1)))
 
G

Guest

Check out offset, like =sum(offset(a1,0,0,1,#_Months))
If the # of months is in a cell, you can put the cell reference in the final
argument.
 
G

Guest

Thank you Bob...it works nicely!

Bob Umlas said:
=SUM(A1:OFFSET(A1,0,0,1,mo.))
assuming "mo." is the defined name, otherwise you can use the MONTH function
of the cell containing the date (if the date is in Z1, for example,
=SUM(A1:OFFSET(A1,0,0,1,MONTH(1)))
 

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