+ Reply to Thread
Results 1 to 7 of 7

If Statements - Multiple formulae

  1. #1
    Ms MIS
    Guest

    If Statements - Multiple formulae

    I have a worksheet with 5 columns (A-E)
    I want to create a formula in column E to do the following;

    If column A = SJN and column C = SJN
    Then output B+D
    Else If column A = SJN and column C <> SJN
    Then output B
    Else If column A<>SJN and column C = SJN
    Then output D

    Can anyone help me?
    Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Try this.


    =IF(AND(A1="SJN",C1="SJN"),SUM(B1,D1),IF(AND(A1="SJN",C1<>"SJN"),B1,IF(AND(A1<>"SJN",C1="SJN"),D1,"")))


    Cheers,
    Steve

  3. #3
    Bruno Campanini
    Guest

    Re: If Statements - Multiple formulae

    "Ms MIS" <[email protected]> wrote in message
    news:[email protected]...
    >I have a worksheet with 5 columns (A-E)
    > I want to create a formula in column E to do the following;
    >
    > If column A = SJN and column C = SJN
    > Then output B+D
    > Else If column A = SJN and column C <> SJN
    > Then output B
    > Else If column A<>SJN and column C = SJN
    > Then output D


    =IF(AND(A1="SJN",C1="SJN"),B1+D1,
    IF(AND(A1="SJN",C1<>"SJN"),B1,
    IF(AND(A1<>"SJN",C1="SJN"),D1,)))

    Ciao
    Brunio



  4. #4
    Stefi
    Guest

    RE: If Statements - Multiple formulae

    It's not clear what is SJN, so I supposed it's a string. Type in E1 and fill
    down as needed:

    =IF(AND(A1="sjn",C4="sjn"),B1&D1,IF(AND(A1="sjn",C1<>"sjn"),B1,IF(AND(A1<>"sjn",C1="sjn"),D1,"not thought of")))

    Regards,
    Stefi

    „Ms MIS” ezt *rta:

    > I have a worksheet with 5 columns (A-E)
    > I want to create a formula in column E to do the following;
    >
    > If column A = SJN and column C = SJN
    > Then output B+D
    > Else If column A = SJN and column C <> SJN
    > Then output B
    > Else If column A<>SJN and column C = SJN
    > Then output D
    >
    > Can anyone help me?
    > Thanks.


  5. #5
    Ron Coderre
    Guest

    RE: If Statements - Multiple formulae

    Try this:
    For values in Row 2:
    E2: =(A2="SJN")*B2+(C2="SJN")*D2

    Does that help?

    ***********
    Regards,
    Ron


    "Ms MIS" wrote:

    > I have a worksheet with 5 columns (A-E)
    > I want to create a formula in column E to do the following;
    >
    > If column A = SJN and column C = SJN
    > Then output B+D
    > Else If column A = SJN and column C <> SJN
    > Then output B
    > Else If column A<>SJN and column C = SJN
    > Then output D
    >
    > Can anyone help me?
    > Thanks.


  6. #6
    Ms MIS
    Guest

    Re: If Statements - Multiple formulae

    Perfect, much appreciated.

    "SteveG" wrote:

    >
    > Try this.
    >
    >
    > =IF(AND(A1="SJN",C1="SJN"),SUM(B1,D1),IF(AND(A1="SJN",C1<>"SJN"),B1,IF(AND(A1<>"SJN",C1="SJN"),D1,"")))
    >
    >
    > Cheers,
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=491840
    >
    >


  7. #7
    Kleev
    Guest

    RE: If Statements - Multiple formulae

    Nothing against the other solutions, but I like this one.

    "Ron Coderre" wrote:

    > Try this:
    > For values in Row 2:
    > E2: =(A2="SJN")*B2+(C2="SJN")*D2
    >
    > Does that help?
    >
    > ***********
    > Regards,
    > Ron
    >
    >
    > "Ms MIS" wrote:
    >
    > > I have a worksheet with 5 columns (A-E)
    > > I want to create a formula in column E to do the following;
    > >
    > > If column A = SJN and column C = SJN
    > > Then output B+D
    > > Else If column A = SJN and column C <> SJN
    > > Then output B
    > > Else If column A<>SJN and column C = SJN
    > > Then output D
    > >
    > > Can anyone help me?
    > > 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