SUMIF with dates... help

Jazzer

Board Regular
Joined
Jun 14, 2011
Messages
71
Hi All,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have been using the following sumif<o:p></o:p>
<o:p></o:p>
=SUMIF('NOMAD DATA'!E11:E390,"<="&D10,'NOMAD DATA'!I11:I390)<o:p></o:p>
<o:p></o:p>
Cell D10 = the desired date on which we wish to know the result<o:p></o:p>
‘NOMAD DATA’ Column E = various dates<o:p></o:p>
‘NOMAD DATA’ Column I = the amounts we are looking to sum<o:p></o:p>
<o:p></o:p>
This has been working fine<o:p></o:p>
<o:p></o:p>
However I now have another variant to contend with ‘NOMAD DATA’ Column F contains dates in some of the rows<o:p></o:p>
I now need to SUM ‘NOMAD DATA’ Column I – excluding any amounts which have a date in column F before or equal to the date in cell D10 <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Thanks<o:p></o:p>
James<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi Try,

=SUMPRODUCT(('NOMAD DATA'!E11:E390<=D10)*('NOMAD DATA'!F11:F390>D10)*I11:I390)
 
Last edited:
Upvote 0
Hi Danny

thanks for that.

it seems to contain an error though - cant see it myself but its not getting any result.

James
 
Upvote 0
Hi All,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have been using the following sumif<o:p></o:p>
<o:p></o:p>
=SUMIF('NOMAD DATA'!E11:E390,"<="&D10,'NOMAD DATA'!I11:I390)<o:p></o:p>
<o:p></o:p>
Cell D10 = the desired date on which we wish to know the result<o:p></o:p>
‘NOMAD DATA’ Column E = various dates<o:p></o:p>
‘NOMAD DATA’ Column I = the amounts we are looking to sum<o:p></o:p>
<o:p></o:p>
This has been working fine<o:p></o:p>
<o:p></o:p>
However I now have another variant to contend with ‘NOMAD DATA’ Column F contains dates in some of the rows<o:p></o:p>
I now need to SUM ‘NOMAD DATA’ Column I – excluding any amounts which have a date in column F before or equal to the date in cell D10 <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Thanks<o:p></o:p>
James<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Do you want this as a new separate formula or do you want to add this condition to the already existing formula?

What version of Excel are you using?
 
Upvote 0
Do you want this as a new separate formula or do you want to add this condition to the already existing formula?

What version of Excel are you using?


adding this condition to the already existing formula would be ideal

excel 2007

thanks
 
Upvote 0
Hi All,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have been using the following sumif<o:p></o:p>
<o:p></o:p>
=SUMIF('NOMAD DATA'!E11:E390,"<="&D10,'NOMAD DATA'!I11:I390)<o:p></o:p>
<o:p></o:p>
Cell D10 = the desired date on which we wish to know the result<o:p></o:p>
‘NOMAD DATA’ Column E = various dates<o:p></o:p>
‘NOMAD DATA’ Column I = the amounts we are looking to sum<o:p></o:p>
<o:p></o:p>
This has been working fine<o:p></o:p>
<o:p></o:p>
However I now have another variant to contend with ‘NOMAD DATA’ Column F contains dates in some of the rows<o:p></o:p>
I now need to SUM ‘NOMAD DATA’ Column I – excluding any amounts which have a date in column F before or equal to the date in cell D10 <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Thanks<o:p></o:p>
James<o:p></o:p>
<o:p></o:p>
<o:p></o:p>

adding this condition to the already existing formula would be ideal

excel 2007

thanks
OK, excluding amounts when the date is <=whatever is the same as including the amounts when the date is >whatever.

So, try this...

=SUMIFS('NOMAD DATA'!I11:I390,'NOMAD DATA'!E11:E390,"<="&D10,'NOMAD DATA'!F11:F390,">"&D10)
 
Upvote 0
Perfect

thanks


One last thing... is it possible to add the INDIRECT function to this formula?
the "NOMADDATA" tab is deleted and refreshed which will produce ref errors on the current formula...

Many Thanks
 
Upvote 0
One last thing... is it possible to add the INDIRECT function to this formula?
the "NOMADDATA" tab is deleted and refreshed which will produce ref errors on the current formula...

Many Thanks
Try this...

=IFERROR(SUMIFS(INDIRECT("'NOMAD DATA'!I11:I390"),INDIRECT("'NOMAD DATA'!E11:E390"),"<="&D10,INDIRECT("'NOMAD DATA'!F11:F390"),">"&D10),"")
 
Upvote 0
thanks - that's done the trick on that front.

I'm not convinced that my sum is correct.
I think my explanation of what was actually needed was unclear

the sum should do the following

SUM NOMADDATA colomn I when NOMADDATA colomn E is "<=" to D10 but not if NOMADDATA colomn F is "<=" to D10 (only when the first past of the query is matched though)
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,814
Members
452,945
Latest member
Bib195

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