Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Moy Emrick
 
Posts: n/a
Default getting the sum of a column with #N/A values in it

I created a VLookup formula to display the value of an item if it exists. If
the value doesn't exist, it displays an #N/A. 1) Can I modify this formula to
display a "0" instead of an #N/A? and 2) How can I total a column which only
excludes #N/A? A copy of my formula is below.

=VLOOKUP(B156,'2003'!B:T,3,0)

Thank you very much.
Moy Emrick
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default getting the sum of a column with #N/A values in it

=if(iserror(yourvlookupformula),0,yourvlookupformu la)

And if you show 0's, you won't need to worry about that sum formula.

But if you want...

=sum(if(isnumber(a1:a10),a1:a10))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

Or if all your errors are #n/a's, you could use:

=SUMIF(A1:A10,"<#n/a")
(not an array formula)

Moy Emrick wrote:

I created a VLookup formula to display the value of an item if it exists. If
the value doesn't exist, it displays an #N/A. 1) Can I modify this formula to
display a "0" instead of an #N/A? and 2) How can I total a column which only
excludes #N/A? A copy of my formula is below.

=VLOOKUP(B156,'2003'!B:T,3,0)

Thank you very much.
Moy Emrick


--

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
Pbl calculating US$ values Joseph Excel Discussion (Misc queries) 1 July 13th 05 04:28 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Lookup values in a column and display them in order with no gaps Snaggle22 Excel Worksheet Functions 1 April 12th 05 11:36 PM
Move column values w/o formula Greg Excel Worksheet Functions 1 February 1st 05 10:01 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM


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