+ Reply to Thread
Results 1 to 8 of 8

Need help with conditional formula

  1. #1
    Registered User
    Join Date
    03-01-2009
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    5

    Need help with conditional formula

    I am creating a sales per day/week worksheet for my reps to keep track of their sales. I have created the sheet that they only have to enter in what they have sold and it automatically calculates what they have sold per hour in the day, and what that makes their weekly total.

    The problem is sometimes they will work 5 days, sometimes 4, sometimes 6 or 7.

    im trying to fix the weekly average formula to divide by 7.5 for 1 day worked, 15 for 2, 22.5 for 3, etc all through 7...

    this is the formula I have now, obviously it doesnt work

    =IF(COUNT(B7:H7)=1,SUM(E42,E75,E110,E143,E175,E207,E238)/7.5,IF(COUNT(B7:H7)=2,SUM(E42,E75,E110,E143,E175,E207,E238)/15,IF(COUNT(B7:H7)=3,SUM(E42,E75,E110,E143,E175,E207,E238)/22.5,IF(COUNT(B7:H7)=4,SUM(E42,E75,E110,E143,E175,E207,E238)/30,IF(COUNT(B7:H7)=5,SUM(E42,E75,E110,E143,E175,E207,E238)/37.5,IF(COUNT(B7:H7)=6,SUM(E42,E75,E110,E143,E175,E207,E238)/45,IF(COUNT(B7:H7)=7,SUM(E42,E75,E110,E143,E175,E207,E238)/52.5)))))))

    Little help please!
    Last edited by Eviloliv3; 03-02-2009 at 09:46 PM.

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Need help with conditional formula

    Since you are dividing the sum based on the number of days * hours per day (7.5 in your example), you can change your formula to this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-01-2009
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with conditional formula

    Quote Originally Posted by mdbct View Post
    Since you are dividing the sum based on the number of days * hours per day (7.5 in your example), you can change your formula to this:

    Please Login or Register  to view this content.
    That code still doesnt work if nothing is entered in.

    it still divides by 7 days.

    If possible, i would like it to not count a value if nothing is entered. it doesnt seem to be doing that now

  4. #4
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: Need help with conditional formula

    Would this do it:

    Please Login or Register  to view this content.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  5. #5
    Registered User
    Join Date
    03-01-2009
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with conditional formula

    Quote Originally Posted by deadlyduck View Post
    Would this do it:

    Please Login or Register  to view this content.
    that didnt work either

  6. #6
    Registered User
    Join Date
    03-01-2009
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with conditional formula

    Im uploading a test excel sheet that has the setup like i have it.

    If all days have a 5, no matter 1,2,3,4,5,6, or 7 days worked, it should still show 0.67 in the weekly total spot
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-01-2009
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with conditional formula

    i fixed it!!!

    it was counting the linked boxes. i updated it to d9:d15 and it works now!!!

  8. #8
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Need help with conditional formula

    The formula in I2 would be:
    Please Login or Register  to view this content.
    Last edited by mdbct; 03-02-2009 at 09:52 PM. Reason: Fixed formula

+ 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