Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default If all cells in a range are N/A then ...

I have a formula that counts all the cells in a range that have "N" and
divides them by the number in cell N/10.

=COUNTIF(N7:N9,"N")/N10

However, sometimes all the cells in a range are N/A.

I want a formula that returns an "N/A" if all the cells in the range are
N/A. and only performs the above formula when all the cells are not N/A.

I hope that's clear.

Any help is greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default If all cells in a range are N/A then ...

=IF(COUNTIF(N7:N9,"#N/A")=COUNTA(N7:N9)+COUNTBLANK(N7:N9),NA(),COUNTIF(N 7:N9,"N")/N10)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Anastasio Jimenez" wrote in
message ...
I have a formula that counts all the cells in a range that have "N" and
divides them by the number in cell N/10.

=COUNTIF(N7:N9,"N")/N10

However, sometimes all the cells in a range are N/A.

I want a formula that returns an "N/A" if all the cells in the range are
N/A. and only performs the above formula when all the cells are not N/A.

I hope that's clear.

Any help is greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default If all cells in a range are N/A then ...

=IF(COUNTIF(N7:N9,"#N/A")=3,"#N/A",COUNTIF(N7:N9,"N")/N10)


"Anastasio Jimenez" wrote:

I have a formula that counts all the cells in a range that have "N" and
divides them by the number in cell N/10.

=COUNTIF(N7:N9,"N")/N10

However, sometimes all the cells in a range are N/A.

I want a formula that returns an "N/A" if all the cells in the range are
N/A. and only performs the above formula when all the cells are not N/A.

I hope that's clear.

Any help is greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default If all cells in a range are N/A then ...

Thanks guys, that did the trick!

"Teethless mama" wrote:

=IF(COUNTIF(N7:N9,"#N/A")=3,"#N/A",COUNTIF(N7:N9,"N")/N10)


"Anastasio Jimenez" wrote:

I have a formula that counts all the cells in a range that have "N" and
divides them by the number in cell N/10.

=COUNTIF(N7:N9,"N")/N10

However, sometimes all the cells in a range are N/A.

I want a formula that returns an "N/A" if all the cells in the range are
N/A. and only performs the above formula when all the cells are not N/A.

I hope that's clear.

Any help is greatly appreciated.

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
multiply range of cells by a fluctuating exchange rate Oliver Excel Discussion (Misc queries) 8 September 3rd 06 09:07 AM
Macro to hide blank cells in a range Dave Excel Discussion (Misc queries) 1 February 1st 06 11:55 PM
Display first, second, etc Nonblank Cells in a Range Jeremy N. Excel Worksheet Functions 12 September 25th 05 01:47 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


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