+ Reply to Thread
Results 1 to 9 of 9

vlookup to stay blank if nothing selected

Hybrid View

stevesunfold vlookup to stay blank if... 11-23-2008, 06:08 AM
stevesunfold dont know if im explaining... 11-23-2008, 07:05 AM
VBA Noob Your formula makes no sense.... 11-23-2008, 07:12 AM
stevesunfold hi vba the cell e29 is the... 11-23-2008, 07:40 AM
VBA Noob Yes I know and you're look at... 11-23-2008, 07:43 AM
martindwilson =if(isna(vlookup(e29,b:c,2,fal... 11-23-2008, 08:40 AM
  1. #1
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690

    vlookup to stay blank if nothing selected

    hi guys
    i have this formula which works well

    =VLOOKUP($E29,$B:$E,2,0)
    which returns the value 0 if nothing selcted
    how can i keep this blank if nothing is selected

    thanks in advance
    Last edited by stevesunfold; 11-23-2008 at 10:13 AM.

  2. #2
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    dont know if im explaining well enough

    but if nothing is selected in cell e29 then i want the cell with forula in to stay blank also

    many thanks

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Your formula makes no sense.

    The item to look up is within the lookup Range.

    If it does return zero you could turn off zero values. Goto Tools > options > edit tab > untick zeros

    or use an if statement

    =IF(VLOOKUP($E29,$B:$E,2,0)=0,"",VLOOKUP($E29,$B:$E,2,0))
    http://spreadsheetpage.com/index.php...s_in_formulas/

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    hi vba
    the cell e29 is the look up reference

    it then goes further down the sheet to look up whats in e29 and cross refernces it then returns the code

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    the cell e29 is the look up reference
    Yes I know and you're look at Cols B to E at Secound column.

    So surely you're look up range would be Cols B to C?

    VBA Noob

  6. #6
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    HI VBA
    yes yoy are right
    i have ammended the code to
    =VLOOKUP($E29,$B:$C,2,0)
    but it returns #na


    or if i use your code
    =IF(VLOOKUP($E29,$B:$C,2,0)=0,"",VLOOKUP($E29,$B:$C,2,0))
    it returns #n/a

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    =if(isna(vlookup(e29,b:c,2,false)),"",if(vlookup(e29,b:c,2,false)=0,"",vlookup(e29,b:c,2,false)))

+ 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