+ Reply to Thread
Results 1 to 8 of 8

How to Combine 2 If statements

  1. #1
    Forum Contributor
    Join Date
    07-21-2013
    Location
    washington dc
    MS-Off Ver
    365 MSO
    Posts
    473

    How to Combine 2 If statements

    Hi-

    How can I combine 2 different If statements? If c2 is a sell i want the inverse calc (-).

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: How to Combine 2 If statements

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    if there can be only those two options (sell/buy)

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: How to Combine 2 If statements

    you could do =IF(C2="sell",-(L2/E2-1),(L2/E2-1)) if sell and buy are your only two options.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,731

    Re: How to Combine 2 If statements

    can you only have two values in c2 sell or buy
    if so
    =IF(C2="sell",-(L2/E2-1),L2/E2-1)

    otherwise
    =IF(C2="sell",-(L2/E2-1),IF(C2="buy",L2/E2-1, "what to do if C2 does not contain sell or buy"))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    08-18-2013
    Location
    belleville il
    MS-Off Ver
    Office 365/Excel 2013
    Posts
    18
    Formula bar
    If(c2="sell", inverse formula, formula)
    That sers the if its true statement for c2 = sell to the inverse formula and all oth to er c2 statements the normal

    Another would be If(c2="sell", inverse formula, (if(c2="buy",formula,0))

    That sets sell to the inverse buy to the normal and all else to 0

  6. #6
    Registered User
    Join Date
    04-21-2014
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to Combine 2 If statements

    I'm in a similar boat. I have very little excel experience. Basically, I have two columns on one sheet. I'm cataloging sales. Only 8 people will be buying. On another sheet, I have it set to say " =IF(Sheet1!H3:H104="Brian",100-Sheet1!I3,100) meaning that if the name appears in the cell to subtract the purchase price from their starting balance. However I can't find a way to use that name more than once without it subtracting ALL of the numbers from the field. I know this is confusing. Is there a way to post files here?

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: How to Combine 2 If statements

    mstrchapl, you need to start your own post so you can receive solutions specific to your problem.

  8. #8
    Registered User
    Join Date
    04-21-2014
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to Combine 2 If statements

    Already did! Thank you sir!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Four IF statements to combine
    By ABSTRAKTUS in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2014, 03:43 PM
  2. [SOLVED] Need help to combine to VBA Statements
    By SamCV in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-06-2013, 02:01 PM
  3. Need to combine 20 IF statements
    By CatMac in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-06-2013, 04:58 AM
  4. Need to combine several IF statements together
    By SumTuck in forum Excel General
    Replies: 7
    Last Post: 06-12-2012, 12:25 PM
  5. Combine two IF statements
    By dpask in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-07-2011, 04:41 PM

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