Problem with sum

Oryon

New Member
Joined
May 21, 2022
Messages
9
Office Version
  1. 2019
Platform
  1. Windows
Hello,

When i change the day from work to vacacions I'm having a problem with the result
Could you tell me wich is the problem with the formula?

Thank you.

Weekly Control.xlsx
ABCDEFGHIJKL
1MAYOMañanasTardes
2SEMFechaDía de la semanaMotivoHora EntradaHora SalidaHora EntradaHora SalidaHoras TrabajadasSaldo Minutos
3181 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins32:00
4192 de mayo de 2022LunesTrabajo8:0015:250:000:007:25-35 mins24:35
5193 de mayo de 2022MartesVacaciones8:0015:300:000:00No Computa0 mins#¡VALOR!
6194 de mayo de 2022MiércolesTrabajo8:0015:300:000:007:30-30 mins#¡VALOR!
7195 de mayo de 2022JuevesTrabajo8:0015:300:000:007:30-30 mins#¡VALOR!
8196 de mayo de 2022ViernesTrabajo8:0015:300:000:007:30-30 mins#¡VALOR!
9197 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
10198 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
11209 de mayo de 2022LunesTrabajo8:0015:300:000:007:30-30 mins
122010 de mayo de 2022MartesTrabajo8:0015:300:000:007:30-30 mins
132011 de mayo de 2022MiércolesTrabajo8:0015:300:000:007:30-30 mins
142012 de mayo de 2022JuevesTrabajo0:000:000:000:000:000 mins
152013 de mayo de 2022ViernesTrabajo0:000:000:000:000:000 mins
162014 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
172015 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
182116 de mayo de 2022LunesTrabajo8:0015:300:000:007:30-30 mins
192117 de mayo de 2022MartesTrabajo0:000:000:000:000:000 mins
202118 de mayo de 2022MiércolesTrabajo0:000:000:000:000:000 mins
212119 de mayo de 2022JuevesTrabajo0:000:000:000:000:000 mins
222120 de mayo de 2022ViernesTrabajo0:000:000:000:000:000 mins
232121 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
242122 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
252223 de mayo de 2022LunesTrabajo8:0015:250:000:007:25-35 mins
262224 de mayo de 2022MartesTrabajo8:0015:300:000:007:30-30 mins
272225 de mayo de 2022MiércolesTrabajo8:0015:300:000:007:30-30 mins
282226 de mayo de 2022JuevesTrabajo8:0015:300:000:007:30-30 mins
292227 de mayo de 2022ViernesTrabajo8:0015:300:000:007:30-30 mins
302228 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
312229 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
322330 de mayo de 2022LunesTrabajo0:000:000:000:000:000 mins
332331 de mayo de 2022MartesTrabajo0:000:000:000:000:000 mins
Mayo
Cell Formulas
RangeFormula
D3,D12:D33,D8:D10D3=IF(C3="Sábado","",IF(C3="Domingo","","Trabajo"))
J3:J33J3=IF(OR(D3="'",D3="enfermedad",D3="festivo",D3="vacaciones",D3="dia libre disposicion",D3="otros",D3="",D3="teletrabajo"),"No Computa",F3-E3+I3-H3)
K3:K33K3=IF(F3=E3,0,IF(D3="Trabajo",J3-$O$1,0))
L3L3=COUNTIFS(D$3:D$33,"Trabajo",A$3:A$33,WEEKNUM(B9,2))*8/24
L4:L8L4=SUM(L3-J4)
C3:C33C3=CHOOSE(WEEKDAY(B3,2),"Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo")
A3:A33A3=WEEKNUM(B3,2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:B33Cell Value>=HOY()textNO
B3:B33Expression=DIASEM(B3;2)>5textNO
O3,K3:K33Cell Value>0textNO
O3,K3:K33Cell Value=0textNO
O3,K3:K33Cell Value<0textNO
C3:C33Cell Value="domingo"textNO
C3:C33Cell Value="sábado"textNO
B3:C33Cell Value<HOY()textNO
Cells with Data Validation
CellAllowCriteria
D3:D33ListTrabajo; Dia Libre Disposicion;Vacaciones;Festivo;Enfermedad;Teletrabajo;Otros;';
E3:E33Time>=7:30:00
F3:F33Time<=19:00:00
G3:G33Timebetween 0:00:00 and 23:59:00
H3:H33Time>=7:30:00
I3:I33Time<=19:00:00
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
@Oryon Welcome.

Does
Excel Formula:
=IFERROR(L3-J4,L3)
in L4 give you what you are wanting?
 
Upvote 0
@Oryon Welcome.

Does
Excel Formula:
=IFERROR(L3-J4,L3)
in L4 give you what you are wanting?

Sorry, but after trying it when I make more hours the sum shows ######. Any solution?

Weekly Control.xlsx
BCDEFGHIJKL
1MAYOMañanasTardes
2FechaDía de la semanaMotivoHora EntradaHora SalidaHora EntradaHora SalidaHoras TrabajadasSaldo Minutos
31 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins40:00
42 de mayo de 2022LunesTrabajo8:0017:000:000:009:0060 mins31:00
53 de mayo de 2022MartesTrabajo8:0017:000:000:009:0060 mins22:00
64 de mayo de 2022MiércolesTrabajo8:0017:000:000:009:0060 mins13:00
75 de mayo de 2022JuevesTrabajo8:0017:000:000:009:0060 mins4:00
86 de mayo de 2022ViernesTrabajo8:0017:000:000:009:0060 mins######################
97 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
108 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
119 de mayo de 2022LunesTrabajo8:0015:300:000:007:30-30 mins
1210 de mayo de 2022MartesTrabajo8:0015:300:000:007:30-30 mins
1311 de mayo de 2022MiércolesTrabajo8:0015:300:000:007:30-30 mins
1412 de mayo de 2022JuevesTrabajo0:000:000:000:000:000 mins
1513 de mayo de 2022ViernesTrabajo0:000:000:000:000:000 mins
1614 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
1715 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
1816 de mayo de 2022LunesTrabajo8:0015:300:000:007:30-30 mins
1917 de mayo de 2022MartesTrabajo0:000:000:000:000:000 mins
2018 de mayo de 2022MiércolesTrabajo0:000:000:000:000:000 mins
2119 de mayo de 2022JuevesTrabajo0:000:000:000:000:000 mins
2220 de mayo de 2022ViernesTrabajo0:000:000:000:000:000 mins
2321 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
2422 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
2523 de mayo de 2022LunesTrabajo8:0015:250:000:007:25-35 mins
2624 de mayo de 2022MartesTrabajo8:0015:300:000:007:30-30 mins
2725 de mayo de 2022MiércolesTrabajo8:0015:300:000:007:30-30 mins
2826 de mayo de 2022JuevesTrabajo8:0015:300:000:007:30-30 mins
2927 de mayo de 2022ViernesTrabajo8:0015:300:000:007:30-30 mins
3028 de mayo de 2022Sábado 0:000:000:000:00No Computa0 mins
3129 de mayo de 2022Domingo 0:000:000:000:00No Computa0 mins
3230 de mayo de 2022LunesTrabajo0:000:000:000:000:000 mins
3331 de mayo de 2022MartesTrabajo0:000:000:000:000:000 mins
Mayo
Cell Formulas
RangeFormula
D3,D12:D33,D9:D10D3=IF(C3="Sábado","",IF(C3="Domingo","","Trabajo"))
J3:J33J3=IF(OR(D3="'",D3="enfermedad",D3="festivo",D3="vacaciones",D3="dia libre disposicion",D3="otros",D3="",D3="teletrabajo"),"No Computa",F3-E3+I3-H3)
K3:K33K3=IF(F3=E3,0,IF(D3="Trabajo",J3-$O$1,0))
L3L3=COUNTIFS(D$3:D$33,"Trabajo",A$3:A$33,WEEKNUM(B9,2))*8/24
L4:L8L4=IFERROR(L3-J4,L3)
C3:C33C3=CHOOSE(WEEKDAY(B3,2),"Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:B33Cell Value>=HOY()textNO
B3:B33Expression=DIASEM(B3;2)>5textNO
O3,K3:K33Cell Value>0textNO
O3,K3:K33Cell Value=0textNO
O3,K3:K33Cell Value<0textNO
C3:C33Cell Value="domingo"textNO
C3:C33Cell Value="sábado"textNO
B3:C33Cell Value<HOY()textNO
Cells with Data Validation
CellAllowCriteria
D3:D33ListTrabajo; Dia Libre Disposicion;Vacaciones;Festivo;Enfermedad;Teletrabajo;Otros;';
E3:E33Time>=7:30:00
F3:F33Time<=19:00:00
G3:G33Timebetween 0:00:00 and 23:59:00
H3:H33Time>=7:30:00
I3:I33Time<=19:00:00
 
Upvote 0
Not sure sadly, as I'm not sure what the objective is.
The hash overspill error is if that value goes negative.
 
Upvote 0
Not sure sadly, as I'm not sure what the objective is.
The hash overspill error is if that value goes negative.
I`m using it to control my schedule at work, this sum is specifically to cotrol the week. It starts disconting from 40 hours, but when i pass the 40 hours reached the formula has this error. So, is there a way that after resting the hours from 40 and pass it shows for example if i have 10 extra minutes, that shows 40:10.
 
Upvote 0
Take a look at this article re Excel's Date Systems. Differences between the 1900 and the 1904 date system - Office
Basically, the 1900 based system will not support negative times but the 1904 system will.
It only takes a few clicks via OfficeButton > Options >, or similar depending upon your Excel version, to flip from one to the other using a tick-box.
I switched to 1904 Date System and instantly the hashes were replaced with the correct negative h:mm
See if this works for you but do read the article to reassure yourself that the change of system will not present any other compatibility issues.
 
Upvote 0
Take a look at this article re Excel's Date Systems. Differences between the 1900 and the 1904 date system - Office
Basically, the 1900 based system will not support negative times but the 1904 system will.
It only takes a few clicks via OfficeButton > Options >, or similar depending upon your Excel version, to flip from one to the other using a tick-box.
I switched to 1904 Date System and instantly the hashes were replaced with the correct negative h:mm
See if this works for you but do read the article to reassure yourself that the change of system will not present any other compatibility issues.
Ok, thank you for your tips.
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,699
Members
449,048
Latest member
81jamesacct

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