Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Eliminate negative numbers from stats

Hello,
I am tracking days for project completions. I do this my subtracting the
start date from the completion date. The days of the uncompleted projects
are negative numbers. Among other stats, I'd like to do averages on
completed tasks. What's the best way to eliminate the negative numbers from
the averages?


Could this be done with a pivot table? I know a pivot table would do a lot
of what I'd like done.

Thanks for your help,
Ellen
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default Eliminate negative numbers from stats

Ellen,

If the days (some positive, some negative) are in C2:C10), you could use:

=AVERAGE(IF(C2:C10=0,C2:C10,""))

This is an array formula, and must be committed with Ctrl-Shift-Enter, not just Enter, any
time it's been edited. It includes zero days. Change = to to exclude zero days.

--
Earl Kiosterud
www.smokeylake.com

Note: Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"EllenM" wrote in message
...
Hello,
I am tracking days for project completions. I do this my subtracting the
start date from the completion date. The days of the uncompleted projects
are negative numbers. Among other stats, I'd like to do averages on
completed tasks. What's the best way to eliminate the negative numbers from
the averages?


Could this be done with a pivot table? I know a pivot table would do a lot
of what I'd like done.

Thanks for your help,
Ellen



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Eliminate negative numbers from stats

Thanks, Earl. Your formula was quite helpful.

"Earl Kiosterud" wrote:

Ellen,

If the days (some positive, some negative) are in C2:C10), you could use:

=AVERAGE(IF(C2:C10=0,C2:C10,""))

This is an array formula, and must be committed with Ctrl-Shift-Enter, not just Enter, any
time it's been edited. It includes zero days. Change = to to exclude zero days.

--
Earl Kiosterud
www.smokeylake.com

Note: Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"EllenM" wrote in message
...
Hello,
I am tracking days for project completions. I do this my subtracting the
start date from the completion date. The days of the uncompleted projects
are negative numbers. Among other stats, I'd like to do averages on
completed tasks. What's the best way to eliminate the negative numbers from
the averages?


Could this be done with a pivot table? I know a pivot table would do a lot
of what I'd like done.

Thanks for your help,
Ellen




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 524
Default Eliminate negative numbers from stats

Sat, 2 Jun 2007 20:58:39 -0400 from Earl Kiosterud
:
"EllenM" wrote in message
...
I am tracking days for project completions. I do this my
subtracting the start date from the completion date. The days of
the uncompleted projects are negative numbers. Among other stats,
I'd like to do averages on completed tasks. What's the best way
to eliminate the negative numbers from the averages?


If the days (some positive, some negative) are in C2:C10), you could use:

=AVERAGE(IF(C2:C10=0,C2:C10,""))

This is an array formula, and must be committed with
Ctrl-Shift-Enter, not just Enter, any time it's been edited. It
includes zero days. Change = to to exclude zero days.


Do you *want* the days of the uncompleted projects to be negative
numbers? If you'd prefer for them to be blanks, then replace your
subtraction:
=B2-A2
with
=if(B2=A2,B2-A2,"")

Then your average will work just fine because =AVERAGE ignores non-
numeric cells. No array formulas or other special stuff needed.


--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Eliminate negative numbers from stats

Thanks, Stan. Yes I want the uncompleted project days to be blank.

"Stan Brown" wrote:

Sat, 2 Jun 2007 20:58:39 -0400 from Earl Kiosterud
:
"EllenM" wrote in message
...
I am tracking days for project completions. I do this my
subtracting the start date from the completion date. The days of
the uncompleted projects are negative numbers. Among other stats,
I'd like to do averages on completed tasks. What's the best way
to eliminate the negative numbers from the averages?


If the days (some positive, some negative) are in C2:C10), you could use:

=AVERAGE(IF(C2:C10=0,C2:C10,""))

This is an array formula, and must be committed with
Ctrl-Shift-Enter, not just Enter, any time it's been edited. It
includes zero days. Change = to to exclude zero days.


Do you *want* the days of the uncompleted projects to be negative
numbers? If you'd prefer for them to be blanks, then replace your
subtraction:
=B2-A2
with
=if(B2=A2,B2-A2,"")

Then your average will work just fine because =AVERAGE ignores non-
numeric cells. No array formulas or other special stuff needed.


--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/

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 I eliminate negative values in a spreadsheet ? Grant Excel Discussion (Misc queries) 2 October 31st 06 02:13 AM
Set negative numbers to zero. Do not calculate with negative valu Excel Headache Excel Discussion (Misc queries) 4 September 14th 06 08:56 PM
change 2000 cells (negative numbers) into positive numbers lisbern Excel Worksheet Functions 2 August 16th 06 05:54 PM
hOW TO ELIMINATE COL. ABC ROW AND ROW NUMBERS IN EXCEL SHEET DianeMLynch Setting up and Configuration of Excel 3 April 20th 06 04:47 PM
macro to eliminate repeating account numbers Sarah New Users to Excel 2 March 16th 05 11:11 PM


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