#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Vlookup and IF?


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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Vlookup and IF?

Thank you Sandy - that worked perfect!
--
Vance


"Sandy Mann" wrote:

=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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup a Vlookup adamb2000 Excel Worksheet Functions 4 June 28th 06 10:54 PM
VLOOKUP Problem Ian Excel Discussion (Misc queries) 3 April 6th 06 06:47 PM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"