+ Reply to Thread
Results 1 to 3 of 3

IF and SUM not returning desired result

  1. #1
    Registered User
    Join Date
    08-29-2007
    Posts
    45

    IF and SUM not returning desired result

    Please Login or Register  to view this content.
    I have the above formula entered in a cell where c15 is the number of hours worked. The other cells contained numbers based on the number of items sold.

    The desired result is obviously to have 0 returned if no hours have been worked, but it's returning #DIV/0

    I know you can't divide by zero, that's why I have the IF, so I'm stumped as to what is wrong with the calculation.

    Can anyone help?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You need to put the /C15 inside the IF function, i.e. move a parenthesis like this

    =IF(C15=0,0,SUM(V15,T15,R15,P15,N15,L15,J15,H15, F15)/C15)

  3. #3
    Registered User
    Join Date
    08-29-2007
    Posts
    45
    Quote Originally Posted by daddylonglegs
    You need to put the /C15 inside the IF function, i.e. move a parenthesis like this

    =IF(C15=0,0,SUM(V15,T15,R15,P15,N15,L15,J15,H15, F15)/C15)
    doh!! Of course, thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1