+ Reply to Thread
Results 1 to 5 of 5

Combining more than one "IF" function

  1. #1
    Registered User
    Join Date
    01-14-2009
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Combining more than one "IF" function

    Hello,

    I wonder if anybody could please help me with this. What I'm trying to do is as follows.

    If cell A13 says "Sunday" in it, then I want F13 to display 13, otherwise 9. No problem getting this bit, just used =IF(A13="Sunday",13,9). What I also need to add is that if A13 = Sunday AND B13 = 01/12/09 or 02/12/09 (or any other day until Christmas), then F13 = 18. But if A13 does say Sunday but isn't a day in December, then F13 = 13. And if A13 doesn't say Sunday and nor is B13 a date in December, then I need F13 to just display 9.

    I assume all this can be done with one very long IF function. I just haven't got a clue how to string it all together.

    Many thanks in advance.
    Last edited by Pegasus15; 01-31-2009 at 07:21 PM.

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Combining more than one "IF" function

    Please Login or Register  to view this content.
    It'd be something like that.

    I've used the Excel number codes for dates as the greater than less than values, not too sure about dates on here, might need to go about that a different way, but the rest of the formula is correct, I believe. This'd be a lot easier with a sample worksheet so that I knew what type of formatting your cells have.

    mew!

    EDIT!
    Had the wrong value in there for December 1, see proper code above.
    Last edited by mewingkitty; 01-30-2009 at 06:40 PM.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Registered User
    Join Date
    01-14-2009
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Combining more than one "IF" function

    I've attached basically what it looks like.

    I should probably explain that it refers to a part-time job and that the rate per hour on a Sunday is €13 but on a Sunday up to Christmas in December (excluding Christmas Day, as the place won't be open then but including Christmas Eve) is €18.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Combining more than one "IF" function

    Quote Originally Posted by Pegasus15 View Post
    If cell A13 says "Sunday" in it, then I want F13 to display 13, otherwise 9. What I also need to add is that if A13 = Sunday AND B13 = 01/12/09 or 02/12/09 (or any other day until Christmas), then F13 = 18. But if A13 does say Sunday but isn't a day in December, then F13 = 13. And if A13 doesn't say Sunday and nor is B13 a date in December, then I need F13 to just display 9.
    This is what I came up with, just copy it down.

    =IF($A13<>"Sunday",9,IF($B13<40148,13,IF($B13>40171,13,18)))

    or even...

    =IF($A13<>"Sunday",9,IF(OR($B13<40148,$B13>40171),13,18))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

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

    Re: Combining more than one "IF" function

    Worked a treat. Many thanks

+ 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