+ Reply to Thread
Results 1 to 4 of 4

If Statement

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    22

    If Statement

    Thanks for the help in advance.

    I keep getting an error, and I can't figure out how to fix it. I have a bunch of drop down list that can result in different answers. At the end, I want to take what ever the final answer is and use it to continue on my math equation.

    Example 1 Scenario
    A1 = #N/A (because I did not choose it in the drop down list)
    B1 = #N/A (because I did not choose it in the drop down list)
    C1 = 4

    D1 = either A1+B2 or C1

    So... D1 = 4

    Example 2 Scenario
    A1 = 12
    B1 = 12
    C1 = #N/A (because I did not choose it in the drop down list)

    D1 = either A1+B2 or C1

    So... D1 = 24

    Example 3 Scenario
    Note for this final example, B1 is not chosen yet I need to add it to A1. I keep getting an error when I do this.

    A1 = 2,213
    B1 = #N/A (because I did not choose it in the drop down list)
    C1 = #N/A (because I did not choose it in the drop down list)

    D1 = either A1+B2 or C1

    So... D1 = 2,213



    Thanks again for the help.

  2. #2
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: If Statement

    Try this:
    =IF(OR(IFERROR(A1,0)<>0,IFERROR(B1,0)<>0),IFERROR(A1,0)+IFERROR(B1,0),C1)

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: If Statement

    Hello ktkreeger, Can you please upload a sample book?
    Thanks

  4. #4
    Registered User
    Join Date
    07-02-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: If Statement

    Thanks for the help. When writing this out, I thought of a new way to process the data and was able to come to a solution. I made a really large vlookup with vlookups inside it. I was able to process the data without getting an error.

    Thanks for looking and helping.

+ 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. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  2. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  3. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  4. Have question about using .find statement and brackets around After:= statement
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-09-2011, 03:28 PM
  5. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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