Excel, VLOOKUP function returns "0" when field is empty

Solved
Erwan031284 Posted messages 168 Registration date   Status Member Last intervention   -  
Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   -
Hello,

in an Excel file, I use the VLOOKUP function to copy a row of information corresponding to the selection I make in the first cell of the row, from a dropdown list.

To be clearer, I have a list of names (column A) and various pieces of information for each name (columns B, C, D...).
In one cell, I have a dropdown list where I can select any name. And with the VLOOKUP function, I automatically display the information corresponding to the selected name in the cells to the right.

The problem: when a cell containing information is empty, the VLOOKUP function returns a value of "0". And therefore, displays "0" in the cell.
I would like it to display nothing in that case.

How can I do that?

Thanks to the community.

3 answers

  1. via55 Posted messages 14393 Registration date   Status Member Last intervention   2 759
     
    Good evening

    With an IF condition, you check if the value is 0, for example:
    =IF(VLOOKUP(H1,A1:D100,2,0)=0,"",VLOOKUP(H1,A1:D100,2,0))

    Best regards

    --
    "Imagination is more important than knowledge." A. Einstein
    8