+ Reply to Thread
Results 1 to 14 of 14

Comparing Two Vlookups to Render a Result

  1. #1
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Comparing Two Vlookups to Render a Result

    Vlookup Problem.png

    I'm having problems using an IF function to render results with two vlookups. I need to know that, if the "actual family size" and the "total gross" are greater than the table to the left, then the result needs to be "Not Eligible"; otherwise, "Eligible". I have been having a heck of a time nesting formulas; can anyone help?

  2. #2
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Comparing Two Vlookups to Render a Result

    Hi,

    Try this:

    Excel 2016 (Windows) 64 bit
    A
    B
    C
    D
    E
    2
    1
    12140
    6
    24960
    3
    2
    16460
    4
    3
    20859
    5
    4
    25749
    Eligible
    6
    5
    30392
    7
    6
    35542
    Sheet: Sheet55

    Excel 2016 (Windows) 64 bit
    D
    5
    =IF(VLOOKUP(D2,A2:B7,2,0)<E2,"Not Eligible","Eligible")
    Sheet: Sheet55

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Comparing Two Vlookups to Render a Result

    I would think this would work but I'm not sure of your actual ranges so it is based on a few guesses...
    =IF(VLOOKUP(I4,H6:I6,2,FALSE)>VLOOKUP(I4,D6:E11,2,FALSE),"Not Eligible","Eligible")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Re: Comparing Two Vlookups to Render a Result

    Vlookup Problem.png

    Jtakw,
    I got a #N/A result. Did I transcribe your formula suggestion correctly?

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Comparing Two Vlookups to Render a Result

    now that I see your actual ranges here is the adjustment to my formula with what I think you want...
    =IF(VLOOKUP(H34,G37:H37,2,FALSE)>VLOOKUP(H34,B37:C42,2,FALSE),"Not Eligible","Eligible")

  6. #6
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Re: Comparing Two Vlookups to Render a Result

    It didn't work. Just to clarify, I have G37 = H34 and H37 = H31 so that I could create a Vlookup option. This excel sheet will be used to determine eligibility for a program for many people; so the fields will be changing with each new client.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Comparing Two Vlookups to Render a Result

    not sure what isn't working so I am posting a sample with your notes and the results.
    I am still using the formula I gave you in post #5.
    perhaps you can clarify why it isn't working.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Comparing Two Vlookups to Render a Result

    Quote Originally Posted by Kogen View Post
    Attachment 588531

    Jtakw,
    I got a #N/A result. Did I transcribe your formula suggestion correctly?
    Hard to say, looks like you have Merged cells, so I can't be absolutely sure the cell references you're using are correct.
    May be try changing B37:E42 to B37:C42

    But my suspicion is that you may have Text values in the Table (B37:E42) and/or G37, H37

    You can check those values, in an unused cell, enter =ISNUMBER(G37)
    Do the same will the other cells in question.

  9. #9
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Re: Comparing Two Vlookups to Render a Result

    Firstly, thank you for taking the time with me Sambo Kid & Jtakw. F37 & G37 were merged cells and when I un-merged them the formula ran. However, I'm running a number that should be beneath the threshold and it's saying "not eligible". It's frustrating not knowing why something is going wrong... I've attached my excel sheet to show work.

    Excel Forum Example.xlsx

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Comparing Two Vlookups to Render a Result

    change your formula to this...
    =IF(VLOOKUP(H34,G37:H37,2,FALSE)>VLOOKUP(H34,B37:D42,3,FALSE),"Not Eligible","Eligible")
    it is a problem with the merged cells.

  11. #11
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Re: Comparing Two Vlookups to Render a Result

    It worked!

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Comparing Two Vlookups to Render a Result

    good, glad we could help you! AND thank you for the rep!
    Last edited by Sam Capricci; 08-30-2018 at 05:55 PM.

  13. #13
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Comparing Two Vlookups to Render a Result

    Using my formula from Post #2 adjusting cell/range references according to your uploaded sample, shows correct results.

    See attached.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    08-14-2018
    Location
    Hanoi, Vietnam
    MS-Off Ver
    2016
    Posts
    118

    Re: Comparing Two Vlookups to Render a Result

    Or by simple index
    =IF(INDEX($D$37:$D$42,H34)<H37,"NE","E")

+ 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. [SOLVED] Formula to render certain values blank
    By heytherejem in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2018, 10:28 AM
  2. [SOLVED] strange result of values comparing
    By blackarrow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2013, 08:55 AM
  3. [SOLVED] Column Function to Render Zero
    By rentb23 in forum Excel General
    Replies: 5
    Last Post: 11-03-2012, 10:08 AM
  4. Macro using vlookups comparing 2 months paysheet(previous month and current month)
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2012, 03:45 AM
  5. Comparing a value to table of values for result
    By tkendell in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-01-2009, 11:12 PM
  6. Drop Down List:render a schematic
    By IGWright in forum Excel General
    Replies: 2
    Last Post: 09-16-2007, 08:08 AM
  7. Comparing a formated result with a harcoded value
    By a94andwi in forum Excel General
    Replies: 3
    Last Post: 04-13-2006, 09:00 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