Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Sum of a column if some rows contain #n/a

I am looking to add the contents of a column. Some of the values contain
#N/A. Is there a way to add the all of the values in the colums together ,
but ingnore the #N/A?

example:

Object 1 2
Object 2 #N/A
Object 3 #N/A
Object 4 1

Total 3
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Sum of a column if some rows contain #n/a

The best way would be to eliminate the NA's. For instance, if they're
generated by a VLOOKUP(), trap the "match not found" error:

=IF(ISNA(MATCH(A1,J:J,FALSE)),"",VLOOKUP(A1,J:K,2, FALSE))

But you could also use this (array-entered: CTRL-SHIFT-ENTER or
CMD-RETURN):

=SUM(IF(ISNA(B1:B100),,B1:B100))

In article ,
BZeyger wrote:

I am looking to add the contents of a column. Some of the values contain
#N/A. Is there a way to add the all of the values in the colums together ,
but ingnore the #N/A?

example:

Object 1 2
Object 2 #N/A
Object 3 #N/A
Object 4 1

Total 3

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
lock column size for some rows and resize for other rows. Gorskim Excel Discussion (Misc queries) 1 November 20th 07 11:12 PM
printing issue - want to repeat two rows and also 5 rows in column cliffykat Excel Discussion (Misc queries) 0 August 29th 07 10:36 PM
after selecting 50 rows of a column i can't reference the cells in the rows Bob Salzer New Users to Excel 2 July 21st 06 10:29 PM
Auto Fill Column with Date based on rows in other column JOUIOUI Excel Programming 2 June 6th 06 06:28 PM
Pivot Table, Limit 255 rows, Invert rows and column xav Excel Programming 3 December 29th 05 02:01 PM


All times are GMT +1. The time now is 10:15 PM.

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"