+ Reply to Thread
Results 1 to 5 of 5

Using a VLookup within an IF statement

Hybrid View

ppilot Using a VLookup within an IF... 01-31-2017, 04:41 PM
Tony Valko Re: Using a VLookup within an... 01-31-2017, 04:43 PM
ppilot Re: Using a VLookup within an... 01-31-2017, 04:57 PM
Tony Valko Re: Using a VLookup within an... 01-31-2017, 05:00 PM
loginjmor Re: Using a VLookup within an... 01-31-2017, 04:45 PM
  1. #1
    Registered User
    Join Date
    03-01-2010
    Location
    Portland, OR
    MS-Off Ver
    Office 365
    Posts
    58

    Using a VLookup within an IF statement

    So here's what I am trying to do:

    I have two tabs of data.

    Lets say the first tab has four columns:

    A, B, C, D -

    The second tab also has four Columns:

    A, B, C, D - Column D is a calculation

    I want to have Column D on the first tab result "Cleared" if the company listed in Column B has a zero balance in Column D of the second tab. Otherwise leave blank.

    Here is the formula I tried, but I always get a blank instead of a cleared:

    =IF(VLOOKUP(B1,'AP Testing'!$A$2:$D$118,4,FALSE)="0","Cleared","")

    Any thoughts?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using a VLookup within an IF statement

    Try removing the quotes from around the 0.

    When you quote numbers Excel evaluates them as TEXT.

    "0" and 0 are not the same!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    03-01-2010
    Location
    Portland, OR
    MS-Off Ver
    Office 365
    Posts
    58

    Re: Using a VLookup within an IF statement

    Quote Originally Posted by Tony Valko View Post
    Try removing the quotes from around the 0.

    When you quote numbers Excel evaluates them as TEXT.

    "0" and 0 are not the same!
    And you are correct and I am an idiot. That fixed the formula! Thank You

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using a VLookup within an IF statement

    You're welcome. Thanks for the feedback!

  5. #5
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Using a VLookup within an IF statement

    Hi -

    It's really difficult to debug a problem without some sample data. Can you post a small sample spreadsheet (not an image) with any sensitive data removed or replaced? For example, change names to ABC, DEF, and so forth.

    Thanks
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

+ 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. Help please if statement with vlookup
    By PREMEDMEDIC in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-14-2016, 08:16 AM
  2. [SOLVED] If statement with vlookup?
    By lee2121 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-09-2015, 09:28 AM
  3. [SOLVED] Please help with Vlookup and If Statement
    By crazysniper in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-24-2012, 12:26 PM
  4. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  5. Using a VLOOKUP and IF statement inside an IF statement
    By Isis3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2011, 07:04 PM
  6. Excel 2007 : IF Statement/VLOOKUP
    By trecbone in forum Excel General
    Replies: 2
    Last Post: 02-19-2010, 03:47 AM
  7. IF Statement, or Vlookup?? HELP
    By holloway1000 in forum Excel General
    Replies: 3
    Last Post: 06-18-2009, 06:04 AM

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