Forum Discussion

Katie830's avatar
Katie830
Copper Contributor
Dec 07, 2021
Solved

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...
  • mtarler's avatar
    Dec 07, 2021
    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)

Resources