sumif function with delayed application

jbrown021286

Board Regular
Joined
Mar 13, 2023
Messages
81
Office Version
  1. 365
Platform
  1. Windows
hours log.xlsx
BCDEFGHIJKLMNOPQ
2DaydatenotesROstatusSUMDaignosisCODEJOBFLAG TIMEADJUSTMENTColumn1
3Monday4/8/202462083835.4micu keyless reciver and battery  5.4don’t countWaitingincorect
4Monday4/8/20246208727 door glass  000
5Monday4/8/202462087272.0rotors  2TotalNot VerifyedVerifyed
6Monday4/8/202462087270.2cfcabin filter0.20.000
7Monday4/8/202462087275.0timing cover resaeal  5
8     DayHoursAverage
9     Monday12.6
10     Tuesday0
11     Wednesday0
12     Thursday0
13     Friday0
14     Saturday0
15     
16     
17     
18     
19     
20     
LOG
Cell Formulas
RangeFormula
B3:B20B3=IFERROR((TEXT(WEEKDAY($C3),"Dddd")),"")
C3:C20C3=IF([@RO]<>"",IF(C3="",TODAY(),C3),"")
J3:J20J3=IF(I3="","",INDEX($Y$3:$Y$91,MATCH(I3,$X$3:$X$91,0),1))
K3:K20K3=IF(J3="","",INDEX($Z$3:$Z$91,MATCH(I3,$X$3:$X$91,0),1))
N4N4=SUMIF(E:E,"N",F:F)+SUMIF(E:E,"cnf",F:F)
O4O4=SUMIF(E:E,"w",F:F)
P4P4=SUMIF(E:E,"x",F:F)
N6N6=SUM(F:F,)-SUMIF(E:E,"N",F:F)-SUMIF(E:E,"nf",F:F)-O2
O6O6=SUMIF(E:E,"",F:F)+SUMIF(E:E,"c",F:F)
P6P6=SUMIF(E:E,"G",F:F)-O2
O9:O14O9=SUMIF($B$3:$B$280,N9,$G$3:$G$280)
G3:G20G3=SUMIF(Table111[@[FLAG TIME]:[ADJUSTMENT]],"<>",Table111[@[FLAG TIME]:[ADJUSTMENT]])
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F3:F280Cell Value=$N$39textNO
H5:H7Cell Value=$N$38textNO
H5:H7Cell Value=$N$37textNO
H5:H7Cell Value=$N$36textNO
H5:H7Cell Value=$N$35textNO
H5:H7Cell Value=$N$34textNO
H5:H7Cell Value=$N$33textNO
H19Cell Value=$N$38textNO
H19Cell Value=$N$37textNO
H19Cell Value=$N$36textNO
H19Cell Value=$N$35textNO
H19Cell Value=$N$34textNO
H19Cell Value=$N$33textNO
F3:F280Cell Value=$N$38textNO
F3:G280Cell Value=$N$37textNO
F3:G280Cell Value=$N$36textNO
F3:G280Cell Value=$N$35textNO
F3:G280Cell Value=$N$34textNO
F3:G280Cell Value=$N$33textNO
B3:C279Expression=" =COUNTIFS(D:D,A1,E:E,J2)>0"textNO
B3:C279Expression=COUNTIFS(J:J,XEY4,#REF!,B3)>0textNO
E3:E280,L22:L52,O36,O83Expression=COUNTIF(T:T,E3)>0textNO
G3:G280Expression=" =COUNTIFS(D:D,A1,E:E,J2)>0"textNO
G3:G280Expression=COUNTIFS(T:T,E3,U:U,G3)>0textNO
L3:M5,V3:V280,M6:M7Expression=COUNTIFS(XEX:XEX,K3,XEZ:XEZ,L3)>0textNO

is there a way to modify the formulas in O9 - O14 so that they don't sum matching days till the next day?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
It is not clear what is required. Anyway try in O9 and copy down.
Excel Formula:
=SUMIF($B$3:$B$280,N9,$G$3:$G$280)+Sum($O$8:$O8)
 
Upvote 0
I think what you want is doable, but before we do that you will need to make some changes to your spreadsheet and formulas. In particular, the formulas in C3:C20 are circular references i.e. the formula in C3 refers to itself. This is poor practice and may result in errors further along. In addition those same cells are using the volatile function TODAY(), meaning they will likely update the next time you open the sheet.
Are these data being entered manually?
 
Upvote 0
hours log.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1
2DaydatenotesROstatusSUMDaignosisCODEJOBFLAG TIMEADJUSTMENTColumn1R.O.Hours
3Monday4/8/20246208383g0.4  0.4don’t countWaitingincorect 62083830.4
4Monday4/8/20246208383g1.0  1000Check List62083831
5Monday4/8/20246208383g2.0  2TotalNot VerifyedVerifyed14.662083832
6Monday4/8/20246208383g3.0micu keyless reciver and battery  324.29.614.662083833
7Monday4/8/20246208767g1.0door glass  162087671
8Tuesday4/9/202462087880.7propropack0.7DayHoursAverage62089270
9Tuesday4/9/202462087881.4pdipdi1.4Monday14.662089270
10Tuesday4/9/202462087920.7propropack0.7Tuesday9.662089270
11Tuesday4/9/202462087921.4pdipdi1.4Wednesday062089270.2
12Tuesday4/9/202462087930.7propropack0.7Thursday062089272
13Tuesday4/9/202462087931.4pdipdi1.4Friday062089275
14Monday4/8/20246208927g   0Saturday0
15Monday4/8/20246208927g   0
16Monday4/8/20246208927g   0
17Monday4/8/20246208927g   
18Monday4/8/20246208927g0.2cfcabin filter0.2
19Monday4/8/20246208927g2.0rotors  2
20Monday4/8/20246208927g5.0timing cover resaeal  5
21Tuesday4/9/202462090232.5valve adj  2.5
22Tuesday4/9/202462090230.8bsBrake Service0.8
23     
24     
25     
26     
27     XIncorrect
28     GVerifyed
29     WWaiting
30     NDon’t Count
31     cNeed to check
32     nfclosed not flaged
33     wtfWrong tech flaged
34     
35     
36     
Log
Cell Formulas
RangeFormula
J3:J36J3=IF(I3="","",INDEX($Y$3:$Y$91,MATCH(I3,$X$3:$X$91,0),1))
K3:K36K3=IF(J3="","",INDEX($Z$3:$Z$91,MATCH(I3,$X$3:$X$91,0),1))
N4N4=SUMIF(F:F,"N",G:G)+SUMIF(F:F,"cnf",G:G)
O4O4=SUMIF(F:F,"w",G:G)
P4P4=SUMIF(F:F,"x",G:G)
S5S5=SUM(V:V)
N6N6=SUM(G:G,)-SUMIF(F:F,"N",G:G)-SUMIF(F:F,"nf",G:G)-O2
O6O6=SUMIF(F:F,"",G:G)+SUMIF(F:F,"c",G:G)
P6P6=SUMIF(F:F,"G",G:G)-O2
C8:C13,C21:C36C8=IF([@RO]>0,TODAY(),"")
O9O9=SUMIF($B$3:$B$280,N9,$G$3:$G$280)+SUM($O$8:$O8)
O10:O14O10=SUMIF($B$3:$B$280,N10,$G$3:$G$280)
B3:B36B3=IFERROR(TEXT(WEEKDAY($C3),"Dddd"),"")
G3:G36G3=SUMIF(Table1112933[@[FLAG TIME]:[ADJUSTMENT]],"<>",Table1112933[@[FLAG TIME]:[ADJUSTMENT]])
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O30Expression=COUNTIF(AE:AE,O30)>0textNO
L22:L52,E3:E280Expression=COUNTIF(U:U,E3)>0textNO
C3Expression=" =COUNTIFS(D:D,A1,E:E,J2)>0"textNO
F3:F280Cell Value=$N$33textNO
H5:H7Cell Value=$N$32textNO
H5:H7Cell Value=$N$31textNO
H5:H7Cell Value=$N$30textNO
H5:H7Cell Value=$N$29textNO
H5:H7Cell Value=$N$28textNO
H5:H7Cell Value=$N$27textNO
H19Cell Value=$N$32textNO
H19Cell Value=$N$31textNO
H19Cell Value=$N$30textNO
H19Cell Value=$N$29textNO
H19Cell Value=$N$28textNO
H19Cell Value=$N$27textNO
F3:F280Cell Value=$N$32textNO
F3:G280Cell Value=$N$31textNO
F3:G280Cell Value=$N$30textNO
F3:G280Cell Value=$N$29textNO
F3:G280Cell Value=$N$28textNO
F3:G280Cell Value=$N$27textNO
U3:U280,E28:E37Expression=COUNTIF(XES:XES,E3)>0textNO
G3:G280Expression=" =COUNTIFS(D:D,A1,E:E,J2)>0"textNO
L3:M5,V3:V280,M6:M7Expression=COUNTIFS(XEY:XEY,K3,XFA:XFA,L3)>0textNO
G3:G280Expression=COUNTIFS(U:U,E3,V:V,G3)>0textNO
C3Expression=COUNTIFS(L:L,XEZ4,#REF!,C3)>0textNO
.
here is a better table. as i have everything right now collum g sums into column o if the days match in column b to column n. what i am wanting to do is not have the current day start to sum
in this example O10 Tuesday until the next day Wednesday
 
Upvote 0
I think what you want is doable, but before we do that you will need to make some changes to your spreadsheet and formulas. In particular, the formulas in C3:C20 are circular references i.e. the formula in C3 refers to itself. This is poor practice and may result in errors further along. In addition those same cells are using the volatile function TODAY(), meaning they will likely update the next time you open the sheet.
Are these data being entered manually?
the today functions act as a time stamp when anything is entered into column e. the circular reference is to lock that date in so it doesn't change i added another table example to the thread aswell where i had a couple of issues with my layout. any cells in column c that don't have a formula in the where dates entered manually
 
Upvote 0
hours log.xlsx
ABCDEFGHIJKLMNOP
14/10/2024
2DaydatenotesROstatusSUMDaignosisCODEJOBFLAG TIMEADJUSTMENTColumn1
3Monday4/8/20246208383g0.4  0.4don’t countWaitingincorect
4Monday4/8/20246208383g1.0  1000
5Monday4/8/20246208383g2.0  2TotalNot VerifyedVerifyed
6Monday4/8/20246208383g3.0micu keyless reciver and battery  325.210.614.6
7Monday4/8/20246208767g1.0door glass  1
8Tuesday4/9/202462087880.7propropack0.7DayHoursAverage
9Tuesday4/9/202462087881.4pdipdi1.4Monday14.6
10Tuesday4/9/202462087920.7propropack0.7Tuesday10.6
11Tuesday4/9/202462087921.4pdipdi1.4Wednesday0
12Tuesday4/9/202462087930.7propropack0.7Thursday0
13Tuesday4/9/202462087931.4pdipdi1.4Friday0
14Monday4/8/20246208927g   0Saturday0
15Monday4/8/20246208927g   0
16Monday4/8/20246208927g   0
17Monday4/8/20246208927g   
18Monday4/8/20246208927g0.2cfcabin filter0.2
19Monday4/8/20246208927g2.0rotors  2
20Monday4/8/20246208927g5.0timing cover resaeal  5
21Tuesday4/9/202462090232.5valve adj  2.5
22Tuesday4/9/202462090230.8bsBrake Service0.8
23Tuesday4/9/202462090271.0door glass  1
24     
25     
26     
Log
Cell Formulas
RangeFormula
A1A1=TODAY()
J3:J26J3=IF(I3="","",INDEX($Y$3:$Y$91,MATCH(I3,$X$3:$X$91,0),1))
K3:K26K3=IF(J3="","",INDEX($Z$3:$Z$91,MATCH(I3,$X$3:$X$91,0),1))
N4N4=SUMIF(F:F,"N",G:G)+SUMIF(F:F,"cnf",G:G)
O4O4=SUMIF(F:F,"w",G:G)
P4P4=SUMIF(F:F,"x",G:G)
N6N6=SUM(G:G,)-SUMIF(F:F,"N",G:G)-SUMIF(F:F,"nf",G:G)-O2
O6O6=SUMIF(F:F,"",G:G)+SUMIF(F:F,"c",G:G)
P6P6=SUMIF(F:F,"G",G:G)-O2
O9:O14O9=SUMIFS($G$3:$G$280,$B$3:$B$280,N9,$C$3:$C$280,"<"&A$1)
B3:B26B3=IFERROR(TEXT(WEEKDAY($C3),"Dddd"),"")
C24:C26C24=IF([@RO]<>"",IF(C24="",TODAY(),C24),"")
G3:G26G3=SUMIF(Table1112933[@[FLAG TIME]:[ADJUSTMENT]],"<>",Table1112933[@[FLAG TIME]:[ADJUSTMENT]])
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E3:E280,L22:L52Expression=COUNTIF(U:U,E3)>0textNO
C3Expression=" =COUNTIFS(D:D,A1,E:E,J2)>0"textNO
F3:F280Cell Value=$N$33textNO
H5:H7Cell Value=$N$32textNO
H5:H7Cell Value=$N$31textNO
H5:H7Cell Value=$N$30textNO
H5:H7Cell Value=$N$29textNO
H5:H7Cell Value=$N$28textNO
H5:H7Cell Value=$N$27textNO
H19Cell Value=$N$32textNO
H19Cell Value=$N$31textNO
H19Cell Value=$N$30textNO
H19Cell Value=$N$29textNO
H19Cell Value=$N$28textNO
H19Cell Value=$N$27textNO
F3:F280Cell Value=$N$32textNO
F3:G280Cell Value=$N$31textNO
F3:G280Cell Value=$N$30textNO
F3:G280Cell Value=$N$29textNO
F3:G280Cell Value=$N$28textNO
F3:G280Cell Value=$N$27textNO
G3:G280Expression=" =COUNTIFS(D:D,A1,E:E,J2)>0"textNO
L3:M5,V3:V280,M6:M7Expression=COUNTIFS(XEY:XEY,K3,XFA:XFA,L3)>0textNO
G3:G280Expression=COUNTIFS(U:U,E3,V:V,G3)>0textNO
C3Expression=COUNTIFS(L:L,XEZ4,#REF!,C3)>0textNO

I FIGURED IT OUT BY ADDING A HELPER CELL WITH THE CURRENT DATE AND ADDING AN AGUMENT TO MY SUM IFS FUNCTION
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

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