Announcement

Collapse
No announcement yet.

Nested If Formulas

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nested If Formulas

    Hi,

    I hope it's ok to post this here. I realise this is to do with general 2007 issues but I've posted this in a couple of other forums already and after 2 days I havent had a reply!

    I have been working to produce a sheet that calculated workers overtime rates. For the most part this has been a success but on the final straight, I seem to have hit a brick wall!

    The formula relates to working out hours if a worker takes a day off on holiday. They can take a morning or an afternoon off (or both). I need the sheet to throw back the correct number of hours they have had off in all three situations (morning, afternoon, full day)

    In the formula below the following cells are listed

    G5 = Cell to input Workers Start Time
    H5 = Cell to input Workers Finish Time


    =IF(G5="Holiday","4:30",IF(H5="Holiday","4:30",IF( G5&H5="Holiday","9:00",H5-G5)))

    The bit that doesnt work is the 3rd nested if function (IF(G5&H5="Holiday","9:00",H5-G5). The syntax is correct and if this formula is placed in a cell on it's own it works well!

    Am I doing something really stupid? Or have I lost my mind!

    Thanks for your help as always

  • #2
    Re: Nested If Formulas

    I think you need the AND formula:
    IF(AND(G5="Holiday",H5="Holiday") ,"9:00",H5-G5)
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Nested If Formulas

      Thanks, thats perfect
      Hours of searching lol!

      Thanks once again

      Comment


      • #4
        Re: Nested If Formulas

        No problem!
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment

        Working...
        X