Thread: Vlookup and IF?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Vlookup and IF?

=IF(D21=0,0,VLOOKUP(D18,B33:C49,2))

This however will return zero even in D21 is empty. To avoid that then use:

=IF(D21="","",IFD21=0,0,VLOOKUP(D18,B33:C49,2)))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Vance" wrote in message
...

I am using vlookup to calculate a value which is wroking great. However,
if
another cell has a zero value, I want my vlookup cell to be zero as well.

cell D22...=VLOOKUP(D18,B33:C49,2)

I want to add to the above formula... if another cell (D21) calculation
result is zero, make this cell (D22) zero as well.

What would the new formula be?

Thank you!
Vance



--
Vance