Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Add to formula to put a zero in cell

Hi. I have this formula =VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE). At
the moment if there is no amount in the lookup, a #N/A is returned to my
summary sheet. Then I have to go in and delete all the #N/A's before some of
the summing will work. Is there something I can add to this formula so that
a zero is populated if nothing is found?

Thanks...Laurie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Add to formula to put a zero in cell

=if(isna(vlookup(...)),0,vlookup(...))

Or if you're using xl2007:
=iferror(vlookup(...),0)



Alberta Rose wrote:

Hi. I have this formula =VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE). At
the moment if there is no amount in the lookup, a #N/A is returned to my
summary sheet. Then I have to go in and delete all the #N/A's before some of
the summing will work. Is there something I can add to this formula so that
a zero is populated if nothing is found?

Thanks...Laurie


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Add to formula to put a zero in cell

why is there two vlookups?

=if(isna(VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE))

where in this string would i put the zero?


"Dave Peterson" wrote:

=if(isna(vlookup(...)),0,vlookup(...))

Or if you're using xl2007:
=iferror(vlookup(...),0)



Alberta Rose wrote:

Hi. I have this formula =VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE). At
the moment if there is no amount in the lookup, a #N/A is returned to my
summary sheet. Then I have to go in and delete all the #N/A's before some of
the summing will work. Is there something I can add to this formula so that
a zero is populated if nothing is found?

Thanks...Laurie


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Add to formula to put a zero in cell

One vlookup is the if part, the other is the then part

=IF(ISNA(VLOOKUP($A418,'Dec
07'!$F$13:$N$2000,5,FALSE)),"",VLOOKUP($A418,'Dec
07'!$F$13:$N$2000,5,FALSE))

This formula return a blank-looking cell.

If you want a zero simply change the "" to 0


Gord Dibben MS Excel MVP

On Thu, 17 Sep 2009 14:21:01 -0700, Alberta Rose
wrote:

why is there two vlookups?

=if(isna(VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE))

where in this string would i put the zero?


"Dave Peterson" wrote:

=if(isna(vlookup(...)),0,vlookup(...))

Or if you're using xl2007:
=iferror(vlookup(...),0)



Alberta Rose wrote:

Hi. I have this formula =VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE). At
the moment if there is no amount in the lookup, a #N/A is returned to my
summary sheet. Then I have to go in and delete all the #N/A's before some of
the summing will work. Is there something I can add to this formula so that
a zero is populated if nothing is found?

Thanks...Laurie


--

Dave Peterson


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Add to formula to put a zero in cell

Never mind, I found the reason in an earlier post. Thanks :))

"Dave Peterson" wrote:

=if(isna(vlookup(...)),0,vlookup(...))

Or if you're using xl2007:
=iferror(vlookup(...),0)



Alberta Rose wrote:

Hi. I have this formula =VLOOKUP($A418,'Dec 07'!$F$13:$N$2000,5,FALSE). At
the moment if there is no amount in the lookup, a #N/A is returned to my
summary sheet. Then I have to go in and delete all the #N/A's before some of
the summing will work. Is there something I can add to this formula so that
a zero is populated if nothing is found?

Thanks...Laurie


--

Dave Peterson



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
How can I make a blank cell in a formula cell with a range of cell Vi Excel Discussion (Misc queries) 5 June 21st 07 02:46 PM
Subtract cell formula from existing cell formula [email protected] Excel Programming 2 December 12th 06 12:03 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 01:59 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"