+ Reply to Thread
Results 1 to 3 of 3

If Formula help needed

  1. #1
    Registered User
    Join Date
    01-31-2018
    Location
    St. Louis, MO
    MS-Off Ver
    2010
    Posts
    1

    If Formula help needed

    I'm trying to build an IF formula in excel. Depending on whether the primary cell (G2) has a 'Yes' or a 'No' our salesmen cost sheet will calculate a different commission.

    The following formula is not working, but I think it's close; =IF(G2="yes",K19*.35,""),IF(G2="No",K19*.20,"")

    I'm trying to build one formula based on whether a 'Yes' or 'No' is input into cell G2.

    Thanks in advance for your help!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: If Formula help needed

    Try this:

    =IF(G2="yes",K19*.35,IF(G2="No",K19*.20,""))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  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,503

    Re: If Formula help needed

    here is the reason it fails
    =IF(G2="yes",K19*.35,"") at this point you've finished the formula so if G2 equals yes then you'll get K19*35 but if it is no then it will return the blank and this portion never has to work...
    IF(G2="No",K19*.20,"")
    When you write an IF formula you are saying that if this condition is true do this, otherwise do that (the "do this if fail") if you combine more than one IF then where the "do this if fail" would be is where you begin your next IF statement.
    That is why what Ali gave you should work.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ 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. Replies: 3
    Last Post: 04-06-2016, 12:19 PM
  2. Replies: 1
    Last Post: 01-11-2016, 02:31 PM
  3. [SOLVED] Formula needed to depend formula's range on specified cells
    By VincentNL in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-01-2014, 06:15 AM
  4. Replies: 3
    Last Post: 06-09-2014, 03:29 PM
  5. Replies: 7
    Last Post: 02-03-2013, 06:25 PM
  6. [SOLVED] index formula needed--how to get a formula to skip columns
    By rsmidtisu in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-02-2012, 11:22 AM
  7. Replies: 3
    Last Post: 09-07-2012, 12:07 AM

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