Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Subtotal & #n/a problem

Hello,

I have a spreadsheet that has named columns of data.

Column A (ReadDate) contains dates

Column B (LocationID) contains data (sample point ID's e.g. 0001,
0002, 0003 etc)

Column C (Methane) contains data

The columns have autofilter, so for example I could select sample
point 0003 in column B (LocationID).

On a separate worksheet I created a foruma using SUBTOTAL to
calculate MIN, MAX, MEAN etc. An example of the formula is:

=SUBTOTAL(5,Methane)

which returns the minimum value from the methane column, or the
minimum methane value for a sample point if a specific sample point
had been selected in column B.

The formula worksfine, except if there is a #N/A value in the methane
column. The formula then returns a #N/A error.

My question is - how do I get the SUBTOTAL formula to ignore the #N/A
in the Methane column and do what it is supposed to do? I could
remove the #N/A from the methane column, but I need it there from
charting purposes.

Hope someone can help....

thanks

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Subtotal & #n/a problem


Use the ISERROR method the example below returns 0 if the
formula calcuates an error.

=IF(ISERROR(A4/B4),0,A4/B4)

HTH
-----Original Message-----
Hello,

I have a spreadsheet that has named columns of data.

Column A (ReadDate) contains dates

Column B (LocationID) contains data (sample point ID's

e.g. 0001,
0002, 0003 etc)

Column C (Methane) contains data

The columns have autofilter, so for example I could

select sample
point 0003 in column B (LocationID).

On a separate worksheet I created a foruma using SUBTOTAL

to
calculate MIN, MAX, MEAN etc. An example of the formula

is:

=SUBTOTAL(5,Methane)

which returns the minimum value from the methane column,

or the
minimum methane value for a sample point if a specific

sample point
had been selected in column B.

The formula worksfine, except if there is a #N/A value in

the methane
column. The formula then returns a #N/A error.

My question is - how do I get the SUBTOTAL formula to

ignore the #N/A
in the Methane column and do what it is supposed to do?

I could
remove the #N/A from the methane column, but I need it

there from
charting purposes.

Hope someone can help....

thanks

Michael
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Subtotal & #n/a problem

The long and the short of the answer is that you can't. Subtotal will always
look at the #N/A. You have two options.

1 Remore all of the #N/A s by fixing the formulas

2 Instead of using subtotals use a pivot table. Based on your description
of the data a pivot table should work just fine. In the Table options you can
set error values to be 0 and then your subtotals will work. Additionally you
can graph straight off of the pivot table if that floats your boat...

HTH...

" wrote:

Hello,

I have a spreadsheet that has named columns of data.

Column A (ReadDate) contains dates

Column B (LocationID) contains data (sample point ID's e.g. 0001,
0002, 0003 etc)

Column C (Methane) contains data

The columns have autofilter, so for example I could select sample
point 0003 in column B (LocationID).

On a separate worksheet I created a foruma using SUBTOTAL to
calculate MIN, MAX, MEAN etc. An example of the formula is:

=SUBTOTAL(5,Methane)

which returns the minimum value from the methane column, or the
minimum methane value for a sample point if a specific sample point
had been selected in column B.

The formula worksfine, except if there is a #N/A value in the methane
column. The formula then returns a #N/A error.

My question is - how do I get the SUBTOTAL formula to ignore the #N/A
in the Methane column and do what it is supposed to do? I could
remove the #N/A from the methane column, but I need it there from
charting purposes.

Hope someone can help....

thanks

Michael

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Subtotal & #n/a problem

Ok thanks, I will try using a pivot table - something I have never
used before!


On Wed, 15 Dec 2004 13:13:01 -0800, "Jim Thomlinson"
wrote:

The long and the short of the answer is that you can't. Subtotal will always
look at the #N/A. You have two options.

1 Remore all of the #N/A s by fixing the formulas

2 Instead of using subtotals use a pivot table. Based on your description
of the data a pivot table should work just fine. In the Table options you can
set error values to be 0 and then your subtotals will work. Additionally you
can graph straight off of the pivot table if that floats your boat...

HTH...

" wrote:

Hello,

I have a spreadsheet that has named columns of data.

Column A (ReadDate) contains dates

Column B (LocationID) contains data (sample point ID's e.g. 0001,
0002, 0003 etc)

Column C (Methane) contains data

The columns have autofilter, so for example I could select sample
point 0003 in column B (LocationID).

On a separate worksheet I created a foruma using SUBTOTAL to
calculate MIN, MAX, MEAN etc. An example of the formula is:

=SUBTOTAL(5,Methane)

which returns the minimum value from the methane column, or the
minimum methane value for a sample point if a specific sample point
had been selected in column B.

The formula worksfine, except if there is a #N/A value in the methane
column. The formula then returns a #N/A error.

My question is - how do I get the SUBTOTAL formula to ignore the #N/A
in the Methane column and do what it is supposed to do? I could
remove the #N/A from the methane column, but I need it there from
charting purposes.

Hope someone can help....

thanks

Michael


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
Subtotal Problem Salman Excel Worksheet Functions 3 March 29th 07 10:08 AM
Subtotal command problem Martin B Excel Worksheet Functions 1 November 26th 06 01:34 PM
Subtotal problem. Very strange! Carl Excel Worksheet Functions 0 October 6th 06 04:07 PM
subtotal problem pcscsr[_6_] Excel Programming 0 November 1st 04 09:49 PM
subtotal problem pcscsr[_5_] Excel Programming 1 October 31st 04 10:54 PM


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