#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BSantos
 
Posts: n/a
Default Formula

=IF($I$2="Active",VLOOKUP($E6,Data!$G$4:$AT$1587,2 8,0),"0")

I have this formula above in a cell. I want to add that if the vlookup
doesn't find anything and returns a #N/A than give me ZERO.

I'm doing this so I don't get #n/a in the column and my totals will add up
without giving me #n/a.

Any help? B.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Formula

=IF($I$2="Active",
IF(ISNA(MATCH($E6,Data!$G$4:$G$1587,0)),
0,
VLOOKUP($E6,Data!$G$4:$AT$1587,28,0)
),"0"
)
You can get rid of all the line breaks; I was just using them to pair off
the parens. Basically, the idea is to replace the vlookup() with
if(isna(match()),0,vlookup()). That is, if a match fails (and therefore the
vlookup will fail), return 0, otherwise process the lookup.
--Bruce

"BSantos" wrote:

=IF($I$2="Active",VLOOKUP($E6,Data!$G$4:$AT$1587,2 8,0),"0")

I have this formula above in a cell. I want to add that if the vlookup
doesn't find anything and returns a #N/A than give me ZERO.

I'm doing this so I don't get #n/a in the column and my totals will add up
without giving me #n/a.

Any help? B.

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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Hide formula skateblade Excel Worksheet Functions 10 October 15th 05 08:36 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM


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

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

About Us

"It's about Microsoft Excel"