+ Reply to Thread
Results 1 to 13 of 13

Help with formula for working out billable hours

  1. #1
    Registered User
    Join Date
    06-10-2014
    Posts
    6

    Help with formula for working out billable hours

    Hello, please could someone help me resolve a formula which isn't quite right. I would like to find out the number of billable hours in a given week based different figures for different projects. The formula doesn't work when the number of hours worked last week is greater than the difference between the quoted hours and the total hours worked to date. Here is an example.

    Quoted hours: 35
    Total hours worked to date: 42.5
    Hours worked last week: 3
    Billable last week: -4.5 whereas the figure should be 0. I am using this formula: =IF(D6>0, IF(C6<=B6, D6, B6-(C6-D6)), 0)

    Many thanks,

    Rob
    Last edited by rjrfoster; 06-10-2014 at 10:33 AM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Help with excel formula

    your IF THEN formula is a little off. You want to have =IF(D6>0, do this, else do that.
    if you have nested IFs then =IF(D6>0,do this,IF(C6<=B6,do this, else do that))
    not sure if you want an AND or an OR in the first part or if you want nested ifs.
    maybe this =IF(or(d6>0,c6<=b6),d6,b6-(c6-d6)),0) [not tested]?

    EDIT: BTW, you need to change the title for your post per forum rule #1. Everyone needs help with excel formulas, not very descriptive. And a moderator will likely drop by to reinforce that.
    Last edited by Sam Capricci; 06-10-2014 at 07:42 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    06-10-2014
    Posts
    6

    Re: Help with formular for working out billable hours

    Thanks Sambo kid although unfortunately it says the formula you typed contains an error

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with excel formula

    @rjrfoster,

    instead fo text, you get better help if you add an excel file, without confidential information.

    Please also add the desirede result in you file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Help with excel formula

    there are too many statements in it. If something like what I gave you is what you want, this =IF(or(d6>0,c6<=b6),d6,b6-(c6-d6)),0) needs to change to this =IF(or(d6>0,c6<=b6),d6,b6-(c6-d6))
    but beyond that, oeldere is right, it is hard to write a formula without seeing what factors you want to subtract or add. for example, I wrote this and it worked... =IF(AND(D6>=0,C6<=B6),D6,B6-(C6-B6))
    but I have no idea which values you have in which cells.

  6. #6
    Registered User
    Join Date
    06-10-2014
    Posts
    6

    Re: Help with formula for working out billable hours

    Hi all, thanks for your feedback, I've renamed the post and created an excel sheet which I have attached.

    Greatly appreciated.

    Rob
    Attached Files Attached Files

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Help with formula for working out billable hours

    Hopefully your title is ok now.
    this appears to work.
    =IF(AND(D3>0,C3<=B3),D3,IF(B3-(C3-D3)<0,0,(B3-(C3-D3))))

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with formula for working out billable hours

    e3 =
    Please Login or Register  to view this content.
    and drag down

  9. #9
    Registered User
    Join Date
    06-10-2014
    Posts
    6

    Re: Help with formula for working out billable hours

    Hi oeldere,

    This changes the value in e3, e6, e7 and e8 which are already correct based on their values in columns b, c and d. The new formula would need to keep these value the same whilst showing a correct value of 0 in e4 and e5.

    Hope this makes sense.

    Thanks,

    Rob

  10. #10
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Help with formula for working out billable hours

    What about E8? That also look like it's exceeded it's quoted hours?

  11. #11
    Registered User
    Join Date
    06-10-2014
    Posts
    6

    Re: Help with formula for working out billable hours

    With this one, the first 3.05 hours were within time and in this case the formula works fine.

  12. #12
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Help with formula for working out billable hours

    Try this in E3 and drag down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    06-10-2014
    Posts
    6

    Re: Help with formula for working out billable hours

    That works perfectly, thanks TPDave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-21-2014, 11:43 AM
  2. Macro: Applying formula to multiple cells in excel (formula editing)
    By city in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2012, 06:41 AM
  3. Replies: 0
    Last Post: 03-19-2012, 07:32 PM
  4. Replies: 1
    Last Post: 03-04-2012, 12:03 AM
  5. [SOLVED] Excel 2002 formula displayed not value formula option not checked
    By Dean in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2006, 10:35 AM

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