+ Reply to Thread
Results 1 to 6 of 6

Ignoring blanks

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Ignoring blanks

    I have 3 columns. The first has dates in and the 2nd and 3rd have returns in, both positive and negative. When the return in column m is positive and the return in column n is negative (or vice versa) i want the date in column c to be returned. So far so good. The problem is that some of the cells are blank due to dodgy data.

    =IF(AND(M22<0,N22>0),C22," ")

    When the above formula comes across a negative value in column m and a blank in column n, it still returns the date in column c. I want it to not return a date.

    Any ideas?

    And thank you so much to everyone who's been helping me on here - i only discovered these forums a few days ago and you've helped enormously!

    Thanks
    Jo

  2. #2
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Ignoring blanks

    How about:

    Please Login or Register  to view this content.
    Docendo discimus.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Ignoring blanks

    First, a blank is "", not " ". You should modify your formulas to fix that. (You can use Find and replace; CNTRL H)
    Is it only in column N that you're getting "blanks"?
    Try;
    =IF(AND(M22<0,N22>0, N22<>""),C22,"")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Ignoring blanks

    =if(and(m22<0,n22>0,m22<>""),c22," ")
    Click on star (*) below if this helps

  5. #5
    Registered User
    Join Date
    07-30-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Ignoring blanks

    Thanks all. Have used the 'isnumber' one as have blanks in both columns..

    Which leads me to my next question..

    The formula in the next column is looking at where m is negative and n is positive:

    =IF(AND(M22>0,N22<0),C22," ") (will amend to the isnumber version).

    I'm basically looking to see where the retruns deviate either pos/neg or neg/pos and can do this across 2 columns but would be neater if only in one. But to do that i think i need a if(and(or(... statement and i don't think you can nest that many statements in excel? Or can you?

    Thanks very much

    Jo

  6. #6
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Ignoring blanks

    don't think you can nest that many statements in excel? Or can you?

    Yes you can

+ 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