+ Reply to Thread
Results 1 to 4 of 4

alternate is statement

Hybrid View

  1. #1
    Registered User
    Join Date
    12-09-2008
    Location
    Australia
    Posts
    27

    alternate is statement

    i have attached a copy of an excel file and if you look at the end i am trying to write an IF statement that reads if J = "2-0" then column M = 12-(K) or 12--4 so answer is 16 and then column N = -column M or -16 and then if J = "2-1" then M = 6-(K) or 6--0 = 6 and then N = -M .....

    so if J was "2-1" and (K) -4 then the answer given for column M would be 6--4=10 and column N = -10

    Much appreciated
    Troy
    Attached Files Attached Files
    Last edited by percivaltroy; 05-13-2009 at 01:02 AM.

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

    Re: alternate is statement

    Based solely on your description, not on your sheet, the formula for M would be:

    =IF(J1="2-0",12-K1,IF(J1="2-1",6-K1,0)

    For N:

    =-M1

    Enter those formulas and copy down.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    12-09-2008
    Location
    Australia
    Posts
    27

    Re: alternate is statement

    spot on JB ...thnx heaps..
    cheers troy

  4. #4
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: alternate is statement

    Write below formulas in Cell M1 & N1 and drag it down

    M1 = IF(J1="2-0",12-(K1),IF(J1="2-1",6-(K1),""))

    N1 = -(M1)
    Last edited by mubashir aziz; 05-13-2009 at 01:25 AM. Reason: Oops I was late .....
    If this post helps, Please don't 4get to click the star icon located at the bottom left of my Post.

+ 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