+ Reply to Thread
Results 1 to 4 of 4

Mixing an IF with a vlookup twice?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-08-2015
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    145

    Mixing an IF with a vlookup twice?

    Hi folks,

    I'm trying to use this formula;

    =IF(G4="",IFNA(VLOOKUP(P4,Data!A:B,2,0),""))

    For this purpose:

    Each line that is entered MUST complete the relevant cell in column P then column O performs the lookup and gives the required info.

    (unfortunately columns can't be moved or added to in this sheet)

    But I only want column 0 to perform the lookup if there is no data in column G.

    the above formula kinda works, but it displays 'False' if there is data in column G (i'm guessing the logic rule implies that this answer must either be true or false?)

    How would i change the formula to only perform the lookup in column O if column G is blank?

    As always any assistance is greatly appreciated.

    Cheers.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Mixing an IF with a vlookup twice?

    Hi,

    One way

    Formula: copy to clipboard
    =IF(G4<>"","",VLOOKUP(P4,Data!A:B,2,0))
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Mixing an IF with a vlookup twice?

    Misread post!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,454

    Re: Mixing an IF with a vlookup twice?

    Formula: copy to clipboard
    =IF(G4="",IFNA(VLOOKUP(P4,Data!A:B,2,0),""),"")
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Mixing Formulas
    By nikkie456 in forum Excel General
    Replies: 1
    Last Post: 09-12-2013, 10:54 AM
  2. Mixing AVERAGEIF() with OR() & AND()
    By gdel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-05-2013, 09:39 AM
  3. [SOLVED] Trouble Mixing IF & Vlookup to help manage inventory
    By BearsBikes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2013, 06:47 PM
  4. [SOLVED] Mixing IF & AND Functions
    By mopastor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-27-2012, 09:23 PM
  5. Excel 2007 : Mixing IF & VLOOKUP Statements?
    By steveyh in forum Excel General
    Replies: 3
    Last Post: 10-06-2011, 11:10 AM
  6. mixing ADO and ODBC
    By dlh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2010, 03:48 AM
  7. Mixing VLOOKUP and LEFT functions
    By Kianuz in forum Excel General
    Replies: 2
    Last Post: 08-04-2009, 12:06 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