Consulting

Results 1 to 2 of 2

Thread: VLookup to skip blank cell

  1. #1
    VBAX Newbie
    Joined
    Mar 2017
    Posts
    2
    Location

    VLookup to skip blank cell

    Hi, I need to figure out how to make cell J3 to give a respond as Lvl 1. So I was hoping that if for example: Steven has 3 roles which cover from Level 1 to Level 3, If I am to empty the cell that list Steven in Level 1, J3 would respond Steven as Level 2 and so on. As of right now the only idea i got is by using a regular vlookup, like =VLOOKUP(I3,A9:C14,3,FALSE) then delete per row for unwanted row, making the vlookup work by letting it find the most upper connection it can made. I was just wondering, is there a better way of doing it apart from doing it manually like this?
    Attached Files Attached Files

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Formula array {=MIN(IF(($A$9:$A$14=I3)*($C$9:$C$14>0),$C$9:$C$14))}
    and cheat by custom formatting numbers as "Lvl "0 to avoid text comparisoins
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •