+ Reply to Thread
Results 1 to 2 of 2

Excel If Statements with more than one Solution

  1. #1

    Excel If Statements with more than one Solution

    How can I put all of three of these if statements into one cell? For
    example I want to say if it equals the 1st one than this is true but if
    it equals the 2nd one than this is true, if it equals the 3rd one than
    this is true but if it doesnt equal any of them its 0

    1st IF statement for
    J13: =IF(YEAR($G12)=YEAR(J$12),IF(MONTH($G3)=MONTH(J$12),(($D4*$E3)*50%),"
    ")," ")
    2nd IF statement for
    J13: =IF(YEAR($G12)=YEAR(F$8),IF(MONTH($G12)=MONTH(F8),(($D12*$E12)*25%),"
    ")," ")
    3rd IF statement for
    J13: =IF(YEAR($G12)=YEAR(I$7),IF(MONTH($G12)=MONTH(I$7),(($D12*$E12)*25%),"
    ")," ")


  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Quote Originally Posted by [email protected]
    How can I put all of three of these if statements into one cell? For
    example I want to say if it equals the 1st one than this is true but if
    it equals the 2nd one than this is true, if it equals the 3rd one than
    this is true but if it doesnt equal any of them its 0

    1st IF statement for
    J13: =IF(YEAR($G12)=YEAR(J$12),IF(MONTH($G3)=MONTH(J$12),(($D4*$E3)*50%),"
    ")," ")
    2nd IF statement for
    J13: =IF(YEAR($G12)=YEAR(F$8),IF(MONTH($G12)=MONTH(F8),(($D12*$E12)*25%),"
    ")," ")
    3rd IF statement for
    J13: =IF(YEAR($G12)=YEAR(I$7),IF(MONTH($G12)=MONTH(I$7),(($D12*$E12)*25%),"
    ")," ")

    I'm not going to copy what you have, but it's basically like this:

    =IF(and([conditionsfor1]),[ResultFor1], IF(and([conditionsfor2]), [ResultFor2], IF (and[conditionsfor3]), [ResultFor3], [ResultForNone])))

    Where, for example, [conditionsfor1] is YEAR($G12)=YEAR(F$8),(MONTH($G12)=MONTH(I$7) and [ResultFor1] = (($D12*$E12)*25%.

    Scott

+ 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