+ Reply to Thread
Results 1 to 12 of 12

Having issues with If statement

  1. #1
    Registered User
    Join Date
    07-16-2015
    Location
    High Ridge, MO
    MS-Off Ver
    2010
    Posts
    6

    Having issues with If statement

    Hey all, I'm trying to write a formula for work and I'm at a stand still. What I'm wanting to do is be able to select from a drop down box (already got that going) in cell c2 and based on what option is chosen, either display a number in e2 OR figure an equation in box d2 and display that in e2. I know it's kind of confusing. So an example would be if "Checking Account", "Savings Account", "CD", or "Credit Card" are selected in cell C2, then I want "25" displayed in cell E2. If "Auto Loan" or "Mortgage" is selected from the drop down (C2) then I want it to do the formula "=IF(D2*0.05>150,"150",D2*0.05)" (there will be a number in D2 if auto loan or mortgage is selected) in E2.

    =IF((LOOKUP(C2,Sheet2!B2:B5,3)),"25",(IF(D2*0.05>150,"150",D2*0.05)))

    This is the formula I have now and it's only half working. When "Checking Account" and "Credit Card" are selected, the "25" pops up but not the other two. Also it doesn't do the equation in D2. Also, while all of this is happening I have a running total going on at the bottom so when it says "#N/A" it screws up the total and won't add.


    Please help! I'm in a little bit over my head with this one and I cannot figure out how to make this work. Thank you in advance for any assistance!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Having issues with If statement

    Please post a sample file showing before & after results.

  3. #3
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Having issues with If statement

    Try this:

    =IF(LOOKUP(C2,Sheet2!B2:B5,3),25,IF(OR(C2={"Auto Loan","Mortgage"}),IF(D2*0.05>150,150,D2*0.05)))
    If I've helped U pls click on d *Add Reputation

  4. #4
    Registered User
    Join Date
    07-16-2015
    Location
    High Ridge, MO
    MS-Off Ver
    2010
    Posts
    6

    Re: Having issues with If statement

    No go :/

    It does the same thing

  5. #5
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Having issues with If statement

    hmmm..strange...

    I tried this formula and it works for me:

    =IF(OR(C2={"Checking Account","Credit Card"}),25,IF(OR(C2={"Auto Loan","Mortgage"}),IF(D2*0.05>150,150,D2*0.05)))

    If the formula above does not work then you need to attached your file.

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Having issues with If statement

    If you post a sample workbook with the results you want it will be much easier to help you.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  7. #7
    Registered User
    Join Date
    07-16-2015
    Location
    High Ridge, MO
    MS-Off Ver
    2010
    Posts
    6

    Re: Having issues with If statement

    bhenlee, that worked! Thank you! I've been pulling my hair out (figuratively speaking; I'm bald) for a week now! And if I knew how to post my book on here I would for you guys to see. Thank you again!

  8. #8
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Having issues with If statement

    You're welcome.

    Please mark this thread Solved if you're satisfied with the resolution.

  9. #9
    Registered User
    Join Date
    07-16-2015
    Location
    High Ridge, MO
    MS-Off Ver
    2010
    Posts
    6

    Re: Having issues with If statement

    Ok now I need to throw one more wrench in to the equation. So apparently only auto loans use that formula and cap at 150, mortgages are 500 automatically. How would I go about adding that change? Sorry to seem so helpless here

  10. #10
    Registered User
    Join Date
    07-16-2015
    Location
    High Ridge, MO
    MS-Off Ver
    2010
    Posts
    6

    Re: Having issues with If statement

    morning bump

  11. #11
    Registered User
    Join Date
    07-16-2015
    Location
    High Ridge, MO
    MS-Off Ver
    2010
    Posts
    6

    Re: Having issues with If statement

    IF(OR(C2={"Checking Account","Credit Card","CD","Savings Account"}),25,(IF(c2={"Mortgage"},500,(C2={"Auto Loan"},IF(D2*0.05>150,150,D2*0.05)))))


    This is the formula I'm trying to use to get the "Mortgage" option to show "500" ... I'm stumped again

  12. #12
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Having issues with If statement

    Give this a try:

    =IF(OR(C2={"Checking Account","Credit Card"}),25,IF(C2="Mortgage",500,IF(C2="Auto Loan",IF(D2*0.05>150,150,D2*0.05))))

+ 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. IF Statement Issues
    By AFWard in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-27-2015, 04:55 AM
  2. [SOLVED] Multiple IF statement issues
    By DPW in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2014, 12:29 AM
  3. [SOLVED] If nested statement issues
    By winter12 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-12-2013, 10:51 AM
  4. [SOLVED] Macro "Sumifs" statement syntax issues...
    By herbie226 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2013, 07:24 PM
  5. Replies: 4
    Last Post: 01-16-2013, 04:44 PM
  6. [SOLVED] If then statement causing value issues in Macros
    By ssciarrino in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2005, 02:10 PM
  7. HELP! - IF Statement Issues
    By MGeorges in forum Excel General
    Replies: 2
    Last Post: 02-09-2005, 07:35 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