0

Vlookup with Blank cell I have a Vlookup formula that I want to return "" if the value is empty.For example: =Vlookup(D2, sheet 1,A2:D2,3,0)

Iraj7280
  • 13
  • 1
  • 4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 08 '23 at 14:06
  • Thank you for helping. The Formula is correct. – Iraj7280 Jan 09 '23 at 12:59

2 Answers2

0

When VLOOKUP can't find a value in a lookup table, it returns the #N/A error. You can use the IFNA function or IFERROR function to trap this error. However, when the result in a lookup table is an empty cell, no error is thrown, VLOOKUP simply returns a zero.

This can cause problems when the lookup table contains actual zero values, because it suggests that blank cells in the lookup table also contain zeros, when they in fact are empty. To work around this problem you can test the result of VLOOKUP explicitly with the IF function, then return a custom result if you find an empty string.

You could combine it with IF :

=IF(VLOOKUP(D2, sheet 1,A2:D2,3,0)="","",VLOOKUP(D2, sheet 1,A2:D2,3,0))

Reference : VLOOKUP if blank return blank.

harrymc
  • 455,459
  • 31
  • 526
  • 924
0

Please check this formula: =IF(ISBLANK(VLOOKUP(D2,sheet1,A2:D2,3,0)),"",VLOOKUP(D2,sheet1,A2:D2,3,0)).

Emily
  • 3,339
  • 1
  • 4
  • 6