+ Reply to Thread
Results 1 to 10 of 10

How to add 2 conditions to a Formula or modify existing formula

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Unhappy How to add 2 conditions to a Formula or modify existing formula

    Hi
    I'm trying to add either a new condition to a formula or modify existing formula, so blank cells can't be taken as a number like 0
    Here is the formula =IF(N14>0,1,0)

    ***This is what I do with formulas with similar problems =IF(COUNT(Y14,A14)=2,Y14/A14*100,"") unfortunately the above condition its already a condition by itself so I don't know what to do whether to modify condition or add a new condition which I don't know how to do.

    Thank you very much

    Frank

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How to add 2 conditions to a Formula or modify existing formula

    Unless I've misunderstood, all you need is to use COUNTA instead of COUNT:

    =IF(COUNTA(Y14,A14)=2,Y14/A14*100,"")

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to add 2 conditions to a Formula or modify existing formula

    Thanks for your reply Andrew but the condition I need help with is =IF(N14>0,1,0) the one below is just an example when I deal with formulas only..
    Sorry I should've explained myself better I meant to say condition not formula (I'm trying to add either a new condition to a formula or modify existing formula)

    Thanks

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How to add 2 conditions to a Formula or modify existing formula

    So what you want if your =IF(N14>0,1,0) not to count blank cells as being zero, is that correct?

  5. #5
    Registered User
    Join Date
    11-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to add 2 conditions to a Formula or modify existing formula

    yes

    Thanks A lot andrew

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How to add 2 conditions to a Formula or modify existing formula

    OK, so what do you want it to return if it finds that the target cell is a blank?

    I think what you're probably after here is something along the lines of:

    =IF(ISBLANK(N14),"Something",IF(N14>0,1,0))

  7. #7
    Registered User
    Join Date
    11-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to add 2 conditions to a Formula or modify existing formula

    Sorry still shows the value even thought there was a blank cell,
    I can give you access with a link if you don't mind

    Thanks for the effort Andrew

  8. #8
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How to add 2 conditions to a Formula or modify existing formula

    OK, maybe:

    =IF(TRIM(N14)="","Something",IF(N14>0,1,0))

  9. #9
    Registered User
    Join Date
    11-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to add 2 conditions to a Formula or modify existing formula

    It works, Thanks A lot Andrew
    The only thing now there's Something in the cell instead of blank, and because I have another formula after that =X15+Y14 there is an error (error: not a number: something )

    Thanks

  10. #10
    Registered User
    Join Date
    11-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to add 2 conditions to a Formula or modify existing formula

    I figured out Andrew, all I did was erase something and it worked perfect
    Thanks A lot your the best

+ 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