Forum Discussion
Katie830
Dec 07, 2021Copper Contributor
Formula won't complete calculations without all data
I am creating a spreadsheet that calculates tips based on hours worked and have a table with both AM and PM shifts with the below formula- (Total AM tips(L5)/Total AM hours(I32))*Employee's hours wor...
- Dec 07, 2021you won't get an error because of the IFERROR but without it you would get a DIV BY 0 error. So you could break the IFERROR up: =IFERROR(($L$5/$I$32)*I12,0)+IFERROR(($L$6/$J$32)*J12,0)
But it would be better practice to avoid IFERROR so when there is a problem you well know there is a problem. So maybe try: =IF($I$32=0,0,($L$5/$I$32)*I12)+IF($J$32=0,0,($L$6/$J$32)*J12)
mtarler
Dec 07, 2021Silver Contributor
you won't get an error because of the IFERROR but without it you would get a DIV BY 0 error. So you could break the IFERROR up: =IFERROR(($L$5/$I$32)*I12,0)+IFERROR(($L$6/$J$32)*J12,0)
But it would be better practice to avoid IFERROR so when there is a problem you well know there is a problem. So maybe try: =IF($I$32=0,0,($L$5/$I$32)*I12)+IF($J$32=0,0,($L$6/$J$32)*J12)
But it would be better practice to avoid IFERROR so when there is a problem you well know there is a problem. So maybe try: =IF($I$32=0,0,($L$5/$I$32)*I12)+IF($J$32=0,0,($L$6/$J$32)*J12)
- Katie830Dec 07, 2021Copper ContributorThank you so much! This fixed the problem. I feel like I have been on an Excel crash course- good to know not to rely on IFERROR.