Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default sum only if all are numbers, return 'NA' if non-numbers exist. How?

Table:
1 2 3 N 4
N N 2 4 5
1 2 3 4 5

I want to sum each row and expected results are NA, NA, 15 for 1st,
2nd and 3rd row, respectively.

I used IF(ISNUMBER(A1:E1),SUM(A1:E1),"NA") and then shift+ctrl+enter.
but seems the results are not correct. It always give me 6,11,15..:(

any mistake here?

thanks.

yy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default sum only if all are numbers, return 'NA' if non-numbers exist. How?

=SUM(IF(ISNUMBER(A1:E1),A1:E1))

as an array formula

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
oups.com...
Table:
1 2 3 N 4
N N 2 4 5
1 2 3 4 5

I want to sum each row and expected results are NA, NA, 15 for 1st,
2nd and 3rd row, respectively.

I used IF(ISNUMBER(A1:E1),SUM(A1:E1),"NA") and then shift+ctrl+enter.
but seems the results are not correct. It always give me 6,11,15..:(

any mistake here?

thanks.

yy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default sum only if all are numbers, return 'NA' if non-numbers exist. How?

Hi Bob,
thanks but your fomula will have the same results as mine:
10
11
15.
I want to get "NA" for the first two rows.

On Aug 3, 11:57 am, "Bob Phillips" wrote:
=SUM(IF(ISNUMBER(A1:E1),A1:E1))

as an array formula

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message

oups.com...



Table:
1 2 3 N 4
N N 2 4 5
1 2 3 4 5


I want to sum each row and expected results are NA, NA, 15 for 1st,
2nd and 3rd row, respectively.


I used IF(ISNUMBER(A1:E1),SUM(A1:E1),"NA") and then shift+ctrl+enter.
but seems the results are not correct. It always give me 6,11,15..:(


any mistake here?


thanks.


yy- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default sum only if all are numbers, return 'NA' if non-numbers exist. How

=IF(Count(A1:E1)=5,SUM(A1:E1),"NA")


--
Regards,
Tom Ogilvy


" wrote:

Table:
1 2 3 N 4
N N 2 4 5
1 2 3 4 5

I want to sum each row and expected results are NA, NA, 15 for 1st,
2nd and 3rd row, respectively.

I used IF(ISNUMBER(A1:E1),SUM(A1:E1),"NA") and then shift+ctrl+enter.
but seems the results are not correct. It always give me 6,11,15..:(

any mistake here?

thanks.

yy


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default sum only if all are numbers, return 'NA' if non-numbers exist. How

That works.

thank.

yong

On Aug 3, 12:14 pm, Tom Ogilvy
wrote:
=IF(Count(A1:E1)=5,SUM(A1:E1),"NA")

--
Regards,
Tom Ogilvy






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
return a value between set numbers Joe Black Excel Discussion (Misc queries) 3 December 31st 08 04:39 AM
How to return the average of the LAST 3 numbers in a row thorshammer Excel Worksheet Functions 3 August 11th 08 04:15 AM
how to return a set of numbers in column A Toppers Excel Worksheet Functions 0 August 17th 07 02:12 AM
Get different numbers to return text?? Curalice Excel Worksheet Functions 6 January 19th 06 08:20 PM
How to compare 3 numbers and return value basic Excel Worksheet Functions 6 April 8th 05 05:15 AM


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