Results 1 to 6 of 6

If not equal to null (or blank) formula

This is a discussion on If not equal to null (or blank) formula within the Excel Questions forums, part of the Question Forums category; I am trying to write an formula that tests for a null value before executing the remainder of the formula. ...

  1. #1
    New Member
    Join Date
    Mar 2011
    Posts
    3

    Default If not equal to null (or blank) formula

    I am trying to write an formula that tests for a null value before executing the remainder of the formula. Here is the existing formula in cell M2:

    =VLOOKUP(A2,'Sheet2'!$A$2:$J$613,6,FALSE)

    What I'd like is to insert an IF test for A2: If A2 is not null/blank, then perform the VLOOKUP. If A2 is null/blank, leave cell M2 blank.

  2. #2
    Board Regular
    Join Date
    Feb 2006
    Posts
    521

    Default Re: If not equal to null (or blank) formula

    =if(a2<>"",VLOOKUP(A2,'Sheet2'!$A$2:$J$613,6,FALSE),"")
    Computers can only do as much as what the programmer knows. The better the programmer, the better the end product will be.

  3. #3
    Board Regular
    Join Date
    Jun 2005
    Location
    London
    Posts
    6,384

    Default Re: If not equal to null (or blank) formula

    =IF(COUNTIF('Sheet2'!$A$2:$A613,A2),VLOOKUP(A2,'Sheet2'!$A$2:$J$613,6,FALSE),"")
    Neil

  4. #4
    Board Regular
    Join Date
    Dec 2010
    Location
    North East UK
    Posts
    409

    Default Re: If not equal to null (or blank) formula

    If(A2="","",formula)

  5. #5
    New Member
    Join Date
    Mar 2011
    Posts
    3

    Default Re: If not equal to null (or blank) formula

    Thanks, Daunting. That worked. I thought I had tried the exact same formula, but I was getting errors. Obviously, something was wrong with my syntax.

    Thanks everyone else for your replies, too!

  6. #6
    New Member
    Join Date
    Nov 2014
    Posts
    1

    Default Re: If not equal to null (or blank) formula

    I have a question on formatting a cell based on another cell. In Excel 1007, how do I get G3 to highlight itself red if F3 contains the word Fail and G3 is left blank, and then have G3 go back to white highlight if I put a value in G3?
    Last edited by bigtonetucker; Nov 17th, 2014 at 09:50 PM.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com