Pulling MTD totals

  • Thread starter Thread starter MMcCullar
  • Start date Start date
M

MMcCullar

I have a data sheet where the columns each contain a type of data, i.e
hours worked, number of employees, etc. The first cell of each ro
contains that day's date. I have a spreadsheet where I want to pul
month-to-date totals, but I keep getting bad totals. Cell A2 in th
spreadsheet contains the current date. I've been trying to use SUMI
with no success. I tried the following:

{=SUM(IF((MONTH(A2)=MONTH(DATA!A2:A500)),DATA!B2:B500,0))}

I couldn't use SUMPRODUCT because there are empty cells in the range.
Any ideas on how to make this formula work?

Thanks
 
I just used this formula with only 2 dates in e1 and e3. Try it
=SUMPRODUCT((MONTH(E1:E21)=4)*F1:F21)
 
The reason I can't use SUMPRODUCT is that there are empty cells in th
range. I only want to put this formula in once, not have to update i
constantly on a daily basis. If I use SUMPRODUCT over a limited range
it works fine. But the data sheet is going to hold a year's worth o
data. So I need to figure out how to get the MTD totals taking int
account the empty cells in the ranges
 
Back
Top