[TABLE="width: 626"]
<colgroup><col width="835" style="width: 626pt; mso-width-source: userset; mso-width-alt: 30537;"> <tbody>[TR]
[TD="width: 835, bgcolor: transparent"]In F2, I have entered formula IF(B2="","",IF(COUNTIF(B$2:B2,B2)=1,SUMIF($B$2:$B$7,$B2,E$2:$E7),"")) to give the sum of E2. I have dragged it down to F7 to give the sum of column E, per day. But I need it offset on the first row where the letters "sub" appear. F3 an F7 cells instead of F2 and F6. So, I added the offset function. Also, if you realised, in cell D, if there two subs with the same code as column G, it says YES twice. Is there a way to have it only once. n D2 I have used formula IF(ISNUMBER(SEARCH("sub",E1916)),"YES","NO") and dragged it down. I have tried using the countif function taking column G as a reference but it doesn't work. Tried different ways and can't work it out. Would really appreciate your help with this. Many thanks
[TABLE="width: 258"]
<colgroup><col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;"> <col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 3072;"> <col width="88" style="width: 66pt; mso-width-source: userset; mso-width-alt: 3218;"> <col width="50" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1828;"> <col width="27" style="width: 20pt; mso-width-source: userset; mso-width-alt: 987;"> <col width="25" style="width: 19pt; mso-width-source: userset; mso-width-alt: 914;"> <col width="26" style="width: 20pt; mso-width-source: userset; mso-width-alt: 950;"> <tbody>[TR]
[TD="width: 42, bgcolor: transparent"] [/TD]
[TD="width: 84, bgcolor: transparent"]B[/TD]
[TD="width: 88, bgcolor: transparent"]C[/TD]
[TD="width: 50, bgcolor: transparent"]D[/TD]
[TD="width: 27, bgcolor: transparent"]E[/TD]
[TD="width: 25, bgcolor: transparent"]F[/TD]
[TD="width: 26, bgcolor: transparent"]G[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Max[/TD]
[TD="bgcolor: transparent"]NO[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"]3[/TD]
[TD="bgcolor: transparent, align: right"]53[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]3[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Smith (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]54[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]4[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Nortor (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]54[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]5[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Custis (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]55[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6[/TD]
[TD="bgcolor: transparent, align: right"]02/01/2014[/TD]
[TD="bgcolor: transparent"]Barlo[/TD]
[TD="bgcolor: transparent"]NO[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent, align: right"]56[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]7[/TD]
[TD="bgcolor: transparent, align: right"]02/01/2014[/TD]
[TD="bgcolor: transparent"]Conie (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]57[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
<colgroup><col width="835" style="width: 626pt; mso-width-source: userset; mso-width-alt: 30537;"> <tbody>[TR]
[TD="width: 835, bgcolor: transparent"]In F2, I have entered formula IF(B2="","",IF(COUNTIF(B$2:B2,B2)=1,SUMIF($B$2:$B$7,$B2,E$2:$E7),"")) to give the sum of E2. I have dragged it down to F7 to give the sum of column E, per day. But I need it offset on the first row where the letters "sub" appear. F3 an F7 cells instead of F2 and F6. So, I added the offset function. Also, if you realised, in cell D, if there two subs with the same code as column G, it says YES twice. Is there a way to have it only once. n D2 I have used formula IF(ISNUMBER(SEARCH("sub",E1916)),"YES","NO") and dragged it down. I have tried using the countif function taking column G as a reference but it doesn't work. Tried different ways and can't work it out. Would really appreciate your help with this. Many thanks
[TABLE="width: 258"]
<colgroup><col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;"> <col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 3072;"> <col width="88" style="width: 66pt; mso-width-source: userset; mso-width-alt: 3218;"> <col width="50" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1828;"> <col width="27" style="width: 20pt; mso-width-source: userset; mso-width-alt: 987;"> <col width="25" style="width: 19pt; mso-width-source: userset; mso-width-alt: 914;"> <col width="26" style="width: 20pt; mso-width-source: userset; mso-width-alt: 950;"> <tbody>[TR]
[TD="width: 42, bgcolor: transparent"] [/TD]
[TD="width: 84, bgcolor: transparent"]B[/TD]
[TD="width: 88, bgcolor: transparent"]C[/TD]
[TD="width: 50, bgcolor: transparent"]D[/TD]
[TD="width: 27, bgcolor: transparent"]E[/TD]
[TD="width: 25, bgcolor: transparent"]F[/TD]
[TD="width: 26, bgcolor: transparent"]G[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Max[/TD]
[TD="bgcolor: transparent"]NO[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"]3[/TD]
[TD="bgcolor: transparent, align: right"]53[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]3[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Smith (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]54[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]4[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Nortor (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]54[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]5[/TD]
[TD="bgcolor: transparent, align: right"]01/01/2014[/TD]
[TD="bgcolor: transparent"]Custis (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]55[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6[/TD]
[TD="bgcolor: transparent, align: right"]02/01/2014[/TD]
[TD="bgcolor: transparent"]Barlo[/TD]
[TD="bgcolor: transparent"]NO[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent, align: right"]56[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]7[/TD]
[TD="bgcolor: transparent, align: right"]02/01/2014[/TD]
[TD="bgcolor: transparent"]Conie (Sub)[/TD]
[TD="bgcolor: transparent"]YES[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent, align: right"]57[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]