+ Reply to Thread
Results 1 to 4 of 4

Vlookup second column if first is empty not working

  1. #1
    Registered User
    Join Date
    01-30-2012
    Location
    Winchester
    MS-Off Ver
    2007
    Posts
    2

    Vlookup second column if first is empty not working

    Struggling with what I'm doing wrong. http://www.excelforum.com/images/smilies/cool.gif

    I have a Vlookup to a sheet within my workbook. What I need is if column 27 is empty, I need it to return the answer in column 20. What's happening is that it will find column 20....but if there is a number in column 27, it returns 0.

    Help please.

    =IF(ISERROR(VLOOKUP(A2,'GOVT W FRT'!A:AD,27,0)),"0",VLOOKUP(A2,'GOVT W FRT'!A:AD,20,FALSE))

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Vlookup second column if first is empty not working

    Try..

    =IF(VLOOKUP(A2,'GOVT W FRT'!A:AD,27,FALSE)="",VLOOKUP(A2,'GOVT W FRT'!A:AD,20,FALSE),VLOOKUP(A2,'GOVT W FRT'!A:AD,27,FALSE))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

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

    Re: Vlookup second column if first is empty not working

    Try this assuming the expected result of the vlookup is numeric (both columns 20 and 27)

    =LOOKUP(9.99999999999999E+307,VLOOKUP(A2,'GOVT W FRT'!A:AD,{20,27},0))

  4. #4
    Registered User
    Join Date
    01-30-2012
    Location
    Winchester
    MS-Off Ver
    2007
    Posts
    2

    Re: Vlookup second column if first is empty not working

    Thanks Ace!

+ 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. Replies: 5
    Last Post: 05-13-2014, 10:19 AM
  2. Need to find empty filled cells in a column and copy to the empty cell below
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 10:09 AM
  3. [SOLVED] display last non empty cell text - VLOOKUP, INDEX, MATCH not working :(
    By salomip13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2013, 03:17 AM
  4. Clear empty cells not working since they are not empty
    By Skogsborg in forum Excel General
    Replies: 2
    Last Post: 04-25-2013, 04:25 AM
  5. [SOLVED] Macros stop working, supposed to find next empty cell in column and label...
    By Axil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2012, 01:11 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