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

HI folks, thanks for the wonderful resource here. I've found a lot of answers
but I had to ask this one ...

I'm working on a spreadsheet that tallies if certain criteria have been met.

Range N15:N31 has three possible answers Y, N or N/A

In cell N32, I tally all the possible answers
=COUNTIF(N15:N31,"Y")+COUNTIF(N15:N31,"N")

In Cell N33 I tally the percentage of answers that are Y
=COUNTIF(N15:N31,"Y")/N32

In Cell N33 I tally the percentage of answers that are N
=COUNTIF(N15:N31,"N")/N32

ISSUE
I've run into the situation of having "div/0" because sometimes all cells in
the range are N/A.

QUESTION
Is there a way to keep the functionality I have but add "if all in range are
N/A, enter N/A"?

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,688
Default If all cells in a range are N/A, then N/A?

The only reason you'd get #DIV/0! is if N32 = 0 or is empty.

Try testing N32:

=IF(N32=0,"N/A",COUNTIF(..............))

Biff

"Anastasio Jimenez" wrote in
message ...
HI folks, thanks for the wonderful resource here. I've found a lot of
answers
but I had to ask this one ...

I'm working on a spreadsheet that tallies if certain criteria have been
met.

Range N15:N31 has three possible answers Y, N or N/A

In cell N32, I tally all the possible answers
=COUNTIF(N15:N31,"Y")+COUNTIF(N15:N31,"N")

In Cell N33 I tally the percentage of answers that are Y
=COUNTIF(N15:N31,"Y")/N32

In Cell N33 I tally the percentage of answers that are N
=COUNTIF(N15:N31,"N")/N32

ISSUE
I've run into the situation of having "div/0" because sometimes all cells
in
the range are N/A.

QUESTION
Is there a way to keep the functionality I have but add "if all in range
are
N/A, enter N/A"?

Thanks in advance!



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

Yup, you're absolutely right. Well that fixed it but gave me an error
somewhere else. I'll research that one before I think about posting a
question.

Thanks a lot Biff, I'd been scratching my head over that one. So simple too
....

"Biff" wrote:

The only reason you'd get #DIV/0! is if N32 = 0 or is empty.

Try testing N32:

=IF(N32=0,"N/A",COUNTIF(..............))

Biff

"Anastasio Jimenez" wrote in
message ...
HI folks, thanks for the wonderful resource here. I've found a lot of
answers
but I had to ask this one ...

I'm working on a spreadsheet that tallies if certain criteria have been
met.

Range N15:N31 has three possible answers Y, N or N/A

In cell N32, I tally all the possible answers
=COUNTIF(N15:N31,"Y")+COUNTIF(N15:N31,"N")

In Cell N33 I tally the percentage of answers that are Y
=COUNTIF(N15:N31,"Y")/N32

In Cell N33 I tally the percentage of answers that are N
=COUNTIF(N15:N31,"N")/N32

ISSUE
I've run into the situation of having "div/0" because sometimes all cells
in
the range are N/A.

QUESTION
Is there a way to keep the functionality I have but add "if all in range
are
N/A, enter N/A"?

Thanks in advance!




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

You're welcome. Let us know if you need further assistance.

Biff

"Anastasio Jimenez" wrote in
message ...
Yup, you're absolutely right. Well that fixed it but gave me an error
somewhere else. I'll research that one before I think about posting a
question.

Thanks a lot Biff, I'd been scratching my head over that one. So simple
too
...

"Biff" wrote:

The only reason you'd get #DIV/0! is if N32 = 0 or is empty.

Try testing N32:

=IF(N32=0,"N/A",COUNTIF(..............))

Biff

"Anastasio Jimenez" wrote in
message ...
HI folks, thanks for the wonderful resource here. I've found a lot of
answers
but I had to ask this one ...

I'm working on a spreadsheet that tallies if certain criteria have been
met.

Range N15:N31 has three possible answers Y, N or N/A

In cell N32, I tally all the possible answers
=COUNTIF(N15:N31,"Y")+COUNTIF(N15:N31,"N")

In Cell N33 I tally the percentage of answers that are Y
=COUNTIF(N15:N31,"Y")/N32

In Cell N33 I tally the percentage of answers that are N
=COUNTIF(N15:N31,"N")/N32

ISSUE
I've run into the situation of having "div/0" because sometimes all
cells
in
the range are N/A.

QUESTION
Is there a way to keep the functionality I have but add "if all in
range
are
N/A, enter N/A"?

Thanks in advance!






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 07:59 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"