SOLVED

Resetting Cumulative count

%3CLINGO-SUB%20id%3D%22lingo-sub-2280021%22%20slang%3D%22en-US%22%3EResetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280021%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3CBR%20%2F%3EI'm%20looking%20at%20a%20way%20to%20reset%20my%20occupancy%20column%20at%20midnight%20every%20night%2C%20any%20help%20would%20be%20really%20appreciated%20%3A)%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EMolly%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2280021%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20BI%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2281276%22%20slang%3D%22en-US%22%3ERe%3A%20Resetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281276%22%20slang%3D%22en-US%22%3EPerfect%2C%20thanks%20so%20much%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280165%22%20slang%3D%22en-US%22%3ERe%3A%20Resetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280165%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1007088%22%20target%3D%22_blank%22%3E%40mh1245%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20this%20formula%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DMAX(0%2CIF(OR(AND(F2%26lt%3B%26gt%3BF3%2CE2%26gt%3B%3D%3CSTRONG%3E4%3C%2FSTRONG%3E)%2CAND(F2%3DF3%2CE2%26gt%3B%3D%3CSTRONG%3E4%3C%2FSTRONG%3E%2CE3%26lt%3B%3CSTRONG%3E4%3C%2FSTRONG%3E))%2C0%2CG3)%2BA2-B2)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280050%22%20slang%3D%22en-US%22%3ERe%3A%20Resetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280050%22%20slang%3D%22en-US%22%3EThats%20perfect%2C%20thank%20you%20so%20much%20!%20do%20you%20know%20if%20in%20the%20future%20there%20would%20be%20anyway%20to%20reset%20it%20depending%20on%20time%2C%20i.e.%204am%20etc%20%3F%20Sorry%20just%20new%20to%20all%20of%20this%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280044%22%20slang%3D%22en-US%22%3ERe%3A%20Resetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280044%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1007088%22%20target%3D%22_blank%22%3E%40mh1245%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20G2%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DMAX(0%2CIF(F2%26lt%3B%26gt%3BF3%2C0%2CG3)%2BA2-B2)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFill%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280036%22%20slang%3D%22en-US%22%3ERe%3A%20Resetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280036%22%20slang%3D%22en-US%22%3EApologies%20id%20uploaded%20the%20wrong%20one%2C%20ive%20changed%20it%20now%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280029%22%20slang%3D%22en-US%22%3ERe%3A%20Resetting%20Cumulative%20count%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280029%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1007088%22%20target%3D%22_blank%22%3E%40mh1245%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20workbook%20constantly%20asks%20for%20credentials%20for%20a%20MySQL%20database...%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi, 
I'm looking at a way to reset my occupancy column at midnight every night, any help would be really appreciated :),

Thanks,
Molly

6 Replies

@mh1245 

Your workbook constantly asks for credentials for a MySQL database...

Apologies id uploaded the wrong one, ive changed it now
best response confirmed by mh1245 (New Contributor)
Solution

@mh1245 

In G2:

 

=MAX(0,IF(F2<>F3,0,G3)+A2-B2)

 

Fill down.

Thats perfect, thank you so much ! do you know if in the future there would be anyway to reset it depending on time, i.e. 4am etc ? Sorry just new to all of this

@mh1245 

 

Use this formula:

 

=MAX(0,IF(OR(AND(F2<>F3,E2>=4),AND(F2=F3,E2>=4,E3<4)),0,G3)+A2-B2)

Perfect, thanks so much