+ Reply to Thread
Results 1 to 7 of 7

Ignore empty columns, if checking values IF(And..

Hybrid View

NeverGiveUp Ignore empty columns, if... 12-17-2015, 11:01 AM
Jonmo1 Re: Ignore empty columns, if... 12-17-2015, 11:04 AM
AliGW Re: Ignore empty columns, if... 12-17-2015, 11:04 AM
Jonmo1 Re: Ignore empty columns, if... 12-17-2015, 11:10 AM
José Augusto Re: Ignore empty columns, if... 12-17-2015, 11:13 AM
José Augusto Re: Ignore empty columns, if... 12-17-2015, 11:14 AM
NeverGiveUp Re: Ignore empty columns, if... 12-17-2015, 03:53 PM
  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    Hamburg, Germany
    MS-Off Ver
    MS EXCEL 2010
    Posts
    2

    Ignore empty columns, if checking values IF(And..

    Hi Dears,
    created an analysis sheet checking if values are within a certain range.
    Problem is: Some values are not specified, therewith empty...

    Example:
    Is value (C) above minimum (A) and below maximum (B), please return with yes otherwise no.
    Formula used: =IF(AND(C2>=A2;C2<=B2);"YES";"NO")
    Works perfectly, as log (A) and (B) carry values!
    If I have specified only minimum (A) and maximum (B) is empty (or other way round), this formula returns “NO”.
    It should be “YES” as “C” is higher than “A” and who cares about B, it is empty.
    Well I tried several but cant find the key.

    Please HELP!
    Thank you so much

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Ignore empty columns, if checking values IF(And..

    ok, so if both A and B are populated you want
    =IF(AND(C2>=A2;C2<=B2);"YES";"NO")

    But if Only A is populated, and b is blank you want
    =IF(C2>=A2;"YES";"NO")

    But if Only B is populated, and A is blank you want
    =IF(C2<=B2;"YES";"NO")


    Is that about right?

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,239

    Re: Ignore empty columns, if checking values IF(And..

    =if(or(c2>=a2;c2<=b2);"yes";"no")
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Ignore empty columns, if checking values IF(And..

    Quote Originally Posted by AliGW View Post
    =if(or(c2>=a2;c2<=b2);"yes";"no")
    Not quite, if A2 is blank, then C2>=A2 is TRUE, so OR would be true regardless if C2<=B2
    And if both are populated, it will ALWAYS be TRUE regardless of C value, given that B is > A

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Ignore empty columns, if checking values IF(And..

    Or try this
    =IF(AND(C2>=A2,C2<=IF(B2="",C2,B2)),"YES","NO")

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Ignore empty columns, if checking values IF(And..

    Or try this
    =IF(AND(C2>=A2,C2<=IF(B2="",C2,B2)),"YES","NO")

  7. #7
    Registered User
    Join Date
    12-17-2015
    Location
    Hamburg, Germany
    MS-Off Ver
    MS EXCEL 2010
    Posts
    2

    Re: Ignore empty columns, if checking values IF(And..

    IT WORKS!
    Thank you! Took a while until I understood, but have added the command for IF A="" as well and jupidu here we go!
    FANTASTIC! GREAT ! THANK YOU so much.

+ 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. Ignore Empty Columns in Multi Level Bar Graph
    By RnCollins in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-31-2015, 04:24 AM
  2. Replies: 0
    Last Post: 09-15-2012, 02:56 AM
  3. Checking for values in fltered columns
    By e1504 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2012, 07:51 PM
  4. Checking values in two columns
    By Cmorgan in forum Excel General
    Replies: 2
    Last Post: 04-07-2011, 03:25 PM
  5. How to ignore empty cells when getting unique values
    By fia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2011, 07:47 PM
  6. Replies: 2
    Last Post: 10-28-2010, 04:16 AM
  7. checking for empty values and using offset
    By ritz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2007, 08:22 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