Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default How do you sum values in a coloumn when it contains #N/A in a ran.

Hi,
Assuming you cells to SUM are C2:C10, you can either:
- use SUMIF()
=SUMIF(C2:C10,"<#N/A",C2:C10)
- or make sure your vlookup-cells do not return N/A by checking for errors
in the formula:
=IF( ISNA( VLOOKUP(...)),"", VLOOKUP(...))
Then the sum would work fine.
- The main problem in the above method is that, if you have many columns of
VLOOKUP, since Vlookup appears twice in the formula, it will slows down
everything. So a better approach would be to dedicate a full hidden column ,
Say B, to
=Vlookup(...) 'returning a value or NA
This will just be used to see if there is a value or a NA.
Then, elsewhere, in other columns C, D, ... where there is a vlookup
rturning data, do:
column C: =IF(ISNA(B2), "", VLOOKUP(...))
column D: =IF(ISNA(B2), "", VLOOKUP(...))

I hope this helps
Regards,
Sebastien

"sa" wrote:

I have a range of cells that utilizes the VLOOKUP command to search for
numerical data by descrition and place it in a cell. Then I want to add the
numerical data with the sum function. But in some cells there is #N/A because
the numerical data isn't present. The Sum function always returns #N/A when
this occurs.

Can anyone help with this?

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 do you sum values in a coloumn when it contains #N/A in a ran. Tom Ogilvy Excel Programming 0 September 21st 04 06:46 PM
How do you sum values in a coloumn when it contains #N/A in a ran. dave Excel Programming 0 September 21st 04 06:36 PM
How do you sum values in a coloumn when it contains #N/A in a ran. Jack Schitt Excel Programming 0 September 21st 04 06:32 PM
How do you sum values in a coloumn when it contains #N/A in a ran. Jim Thomlinson[_3_] Excel Programming 0 September 21st 04 06:31 PM
How do you sum values in a coloumn when it contains #N/A in a ran. sa Excel Programming 0 September 21st 04 06:17 PM


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

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"