+ Reply to Thread
Results 1 to 3 of 3

IF greater with a Vlookup, no #N/As

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    IF greater with a Vlookup, no #N/As

    I'm currently using the formula belowto determine if my value in A2 (my projection) is less than the amount of my Current Expense.
    Please Login or Register  to view this content.
    If the expense is greater, I want to put the expense, if my projection is greater, I want to put nothing. The formula works, but if the vlookup results in an #N/A, the #N/A is deposited. How can I alter my formula to do what I want but without #N/A's appearing?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: IF greater with a Vlookup, no #N/As

    You can wrap IFERROR around it:

    =IFERROR(IF(VLOOKUP(A2,'Current Expense'!A:E,5,FALSE)>J2,VLOOKUP(A2,'Current Expense'!A:E,5,FALSE)-J2,""),"")

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: IF greater with a Vlookup, no #N/As

    Pete, thanks so much. I had tried to use IFERROR, but got the syntax wrong. Thanks for straightening me out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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