+ Reply to Thread
Results 1 to 8 of 8

Using if function to calculate normal hours

Hybrid View

  1. #1
    Registered User
    Join Date
    05-20-2013
    Location
    fiji
    MS-Off Ver
    Excel 2007
    Posts
    6

    Using if function to calculate normal hours

    HI

    I need help in using IF function. according to the worksheet, normal hours is 8 hours per day Monday to Friday. can anyone help me with the function to calculate normal hours in 1 cell.

    thanks
    sanjeshniNORMAL HOURS.xls

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using if function to calculate normal hours

    Maybe this...

    =MIN(8,N(B3))+MIN(8,N(C3))+MIN(8,N(D3))+MIN(8,N(E3))+MIN(8,N(F3))

    Copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Using if function to calculate normal hours

    Or this in I3:
    Formula: copy to clipboard
    =SUMPRODUCT(((B3:F3>=8)*8)+((B3:F3<8)*B3:F3))

    copied down...
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  4. #4
    Registered User
    Join Date
    05-20-2013
    Location
    fiji
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Using if function to calculate normal hours

    thanks, it works. but my requirement is to use a IF function. can a solution be available on that??

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using if function to calculate normal hours

    Quote Originally Posted by sanjeshni View Post
    thanks, it works. but my requirement is to use a IF function.
    Here's an example that contains IF functions.

    Array entered**:

    =SUM(IF(B4:F4>=8,8,B4:F4))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Last edited by Tony Valko; 05-21-2013 at 11:21 AM.

  6. #6
    Registered User
    Join Date
    05-20-2013
    Location
    fiji
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Using if function to calculate normal hours

    thanks. got it

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using if function to calculate normal hours

    You're welcome!

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Using if function to calculate normal hours

    Is this a classroom assignment ? IF so, this sites policy is to NOT give solutions, just advice..., but if you understand both the proffered solutions, neither is hard to change int an if statement...

+ 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