Hello again guys,
I usually just need to sum values between dates but now I'm in the need of adding a criteria, normally what I use is something like this:
=SUMIFS($H:$H;$A:$A;"<="&B5;$A:$A;">"&C5)
Where I only have one column with values H, and A the one with the dates, and B5 and C5 are the range of dates.
But now my data looks like this:
Sheet1
<table style="width: 541px; height: 180px;" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="mso-width-source:userset;mso-width-alt:2852;width:59pt" width="78"> <col style="mso-width-source:userset;mso-width-alt:1426;width:29pt" width="39"> <col style="mso-width-source:userset;mso-width-alt:2413;width:50pt" width="66"> <col style="mso-width-source:userset;mso-width-alt:1097;width:23pt" width="30"> <col style="mso-width-source:userset;mso-width-alt:5997;width:123pt" width="164"> <col style="mso-width-source:userset;mso-width-alt:9910;width:203pt" width="271"> <col style="mso-width-source:userset;mso-width-alt:2084;width:43pt" width="57"> <col style="mso-width-source:userset;mso-width-alt:1755;width:36pt" width="48"> <col style="width:60pt" span="4" width="80"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt;width:59pt" height="20" width="78">DATE</td> <td class="xl70" style="width:50pt" width="66">CODE</td> <td style="width:36pt" align="center" width="48">Dataa
</td> <td style="width:60pt" align="center" width="80">Datab
</td> <td class="xl69" style="width:60pt" align="center" width="80">Datac</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">4-Jan-11</td> <td class="xl70">SOC</td> <td>
</td> <td class="xl69" align="right">65,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">4-Jan-11</td> <td class="xl70">MML</td> <td>
</td> <td class="xl69" align="right">2,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">4-Jan-11</td> <td class="xl70">MML</td> <td>
</td> <td class="xl69" align="right">25,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">15-Jan-11</td> <td class="xl70">CLM</td> <td>
</td> <td>
</td> <td class="xl69" align="right">76,00 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">15-Jan-11</td> <td class="xl70">SOC</td> <td>
</td> <td>
</td> <td class="xl69" align="right">35,00 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">16-Jan-11</td> <td class="xl70">VEH</td> <td class="xl69" align="right">22,00 </td> <td class="xl69">
</td> <td class="xl69">
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">25-Jan-11</td> <td class="xl70">MML</td> <td>
</td> <td class="xl69" align="right">70,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">28-Jan-11</td> <td class="xl70">VEH</td> <td class="xl69" align="right">22,00 </td> <td class="xl69">
</td> <td class="xl69">
</td></tr></tbody></table>
So I'm trying to sum by date ranges and codes so I end up with a table like:
<table border="0" cellpadding="0" cellspacing="0" width="480"><tbody><tr height="20"></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt;width:60pt" height="20" width="80">CODE </td><td class="xl71" style="width:60pt" align="right" width="80">30-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">23-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">16-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">9-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">2-Jan-11</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">SOC</td><td>
</td><td>
</td><td>35
</td><td>65
</td><td>
</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">CLM</td><td>
</td><td>
</td><td>76
</td><td>
</td><td>
</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">MML</td><td>70
</td><td>
</td><td>
</td><td>27
</td><td>
</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">VEH</td><td>22
</td><td>
</td><td>22
</td><td>
</td><td>
</td></tr></tbody></table>
I already tried something like :
=SUMIFS('Sheet 1'!$C:$E;'Sheet 1'!$A:$A;"<="&B1;Sheet 1'!$A:$A;">"&B2;'Sheet 1'!$B:B;"="&A2)
Any help on this one
thanks
I usually just need to sum values between dates but now I'm in the need of adding a criteria, normally what I use is something like this:
=SUMIFS($H:$H;$A:$A;"<="&B5;$A:$A;">"&C5)
Where I only have one column with values H, and A the one with the dates, and B5 and C5 are the range of dates.
But now my data looks like this:
Sheet1
<table style="width: 541px; height: 180px;" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="mso-width-source:userset;mso-width-alt:2852;width:59pt" width="78"> <col style="mso-width-source:userset;mso-width-alt:1426;width:29pt" width="39"> <col style="mso-width-source:userset;mso-width-alt:2413;width:50pt" width="66"> <col style="mso-width-source:userset;mso-width-alt:1097;width:23pt" width="30"> <col style="mso-width-source:userset;mso-width-alt:5997;width:123pt" width="164"> <col style="mso-width-source:userset;mso-width-alt:9910;width:203pt" width="271"> <col style="mso-width-source:userset;mso-width-alt:2084;width:43pt" width="57"> <col style="mso-width-source:userset;mso-width-alt:1755;width:36pt" width="48"> <col style="width:60pt" span="4" width="80"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt;width:59pt" height="20" width="78">DATE</td> <td class="xl70" style="width:50pt" width="66">CODE</td> <td style="width:36pt" align="center" width="48">Dataa
</td> <td style="width:60pt" align="center" width="80">Datab
</td> <td class="xl69" style="width:60pt" align="center" width="80">Datac</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">4-Jan-11</td> <td class="xl70">SOC</td> <td>
</td> <td class="xl69" align="right">65,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">4-Jan-11</td> <td class="xl70">MML</td> <td>
</td> <td class="xl69" align="right">2,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">4-Jan-11</td> <td class="xl70">MML</td> <td>
</td> <td class="xl69" align="right">25,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">15-Jan-11</td> <td class="xl70">CLM</td> <td>
</td> <td>
</td> <td class="xl69" align="right">76,00 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">15-Jan-11</td> <td class="xl70">SOC</td> <td>
</td> <td>
</td> <td class="xl69" align="right">35,00 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">16-Jan-11</td> <td class="xl70">VEH</td> <td class="xl69" align="right">22,00 </td> <td class="xl69">
</td> <td class="xl69">
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">25-Jan-11</td> <td class="xl70">MML</td> <td>
</td> <td class="xl69" align="right">70,00 </td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl70" style="height:15.0pt" height="20">28-Jan-11</td> <td class="xl70">VEH</td> <td class="xl69" align="right">22,00 </td> <td class="xl69">
</td> <td class="xl69">
</td></tr></tbody></table>
So I'm trying to sum by date ranges and codes so I end up with a table like:
<table border="0" cellpadding="0" cellspacing="0" width="480"><tbody><tr height="20"></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt;width:60pt" height="20" width="80">CODE </td><td class="xl71" style="width:60pt" align="right" width="80">30-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">23-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">16-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">9-Jan-11</td><td class="xl71" style="width:60pt" align="right" width="80">2-Jan-11</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">SOC</td><td>
</td><td>
</td><td>35
</td><td>65
</td><td>
</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">CLM</td><td>
</td><td>
</td><td>76
</td><td>
</td><td>
</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">MML</td><td>70
</td><td>
</td><td>
</td><td>27
</td><td>
</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">VEH</td><td>22
</td><td>
</td><td>22
</td><td>
</td><td>
</td></tr></tbody></table>
I already tried something like :
=SUMIFS('Sheet 1'!$C:$E;'Sheet 1'!$A:$A;"<="&B1;Sheet 1'!$A:$A;">"&B2;'Sheet 1'!$B:B;"="&A2)
Any help on this one
thanks