View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default vlookup ignoring empty cells

instead of =VLOOKUP()
use:
=IF(ISERROR(VLOOKUP()),0,VLOOKUP())
--
Gary''s Student - gsnu200854


"art" wrote:

Hello:

I would like to add two amount by using the vlookup, however one might be
empty, which causes the vlookup to return #Value error. How can I check if
one cell is empty then dont add that cell.

Lets say : A B C D
1 John 600 Mark
2 Mark 550 Jones
3 Marry 650
4 Jones 645

And in cell A6 I should have the formula
=(vlookup(D1,EmpList,2)+Vlookup(D2,EmpList,2)+Vloo kup(D3,EmpList,2)+Vlookup(D4,EmpList,2)

It should return the total amount and ignoring the cell that are empty.

Thanks.

Art