Results 1 to 5 of 5

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,307

    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
    408

    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!

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