+ Reply to Thread
Results 1 to 6 of 6

IF and VLOOKUP combined

Hybrid View

  1. #1
    Registered User
    Join Date
    11-11-2016
    Location
    New Zealand
    MS-Off Ver
    Office 2013
    Posts
    5

    IF and VLOOKUP combined

    Hi
    This is my first time on this forum. I'm used to doing VLOOKUPs but not an IF as well.

    In the attached file I want to put a formula in the red cells that says:
    "Look in the Price List for the code in Col A - if the code has a Quan greater than 0 enter the detail in here. If the value is 0 hide the line."

    I've done the VLOOKUP but need help with the rest of it. If anyone can help me that would be much appreciated.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,177

    Re: IF and VLOOKUP combined

    Try this:

    =IF(VLOOKUP($A11,$A$3:$H$6,7,FALSE)=0,"",VLOOKUP($A11,$A$3:$H$6,8,FALSE))

  3. #3
    Registered User
    Join Date
    11-11-2016
    Location
    New Zealand
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: IF and VLOOKUP combined

    That was great - it only brought through the detail on the items that had greater than 0. But it didn't hide the lines that had a 0 quantity.

    Do I need to change the formula to put NIL in the lines that don't have a 0 and then find all the NIL ones and hide the lines? Or is there an easier way?

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,177

    Re: IF and VLOOKUP combined

    Try this in A10:

    =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($G$3:$G$6)/($G$3:$G$6>0),ROWS($A$10:$A10))),"")

    Copy down and cross.

  5. #5
    Registered User
    Join Date
    11-11-2016
    Location
    New Zealand
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: IF and VLOOKUP combined

    Perfect!

    Thanks!!!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: IF and VLOOKUP combined

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] VLOOKUP and IF Statements combined
    By sgerard21 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2013, 03:12 PM
  2. [SOLVED] IF combined with VLOOKUP
    By dave9860E in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-03-2013, 12:58 AM
  3. [SOLVED] Vlookup combined with index?
    By eight.bit.al in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-08-2013, 08:18 PM
  4. Vlookup first name out of combined name?
    By bruizer31 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2013, 02:03 PM
  5. combined if and vlookup
    By johnf711 in forum Excel General
    Replies: 1
    Last Post: 06-29-2012, 10:58 PM
  6. vlookup help, combined with match()
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-02-2012, 05:22 PM
  7. Excel 2007 : if and vlookup combined
    By 4evertutor in forum Excel General
    Replies: 3
    Last Post: 11-23-2009, 03:48 PM
  8. Can the IF and VLOOKUP functions be combined?
    By WG1 in forum Excel General
    Replies: 3
    Last Post: 08-29-2009, 06:58 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