Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Formula Help

The below formula was provided for the question below, can someone tell me
how to add into the formula how to not include cells missing information so
that it does take those cells into account when calculating the average in
cell C1?

=SUMIF(A1:A7,"Active",B1:B7)/COUNTIF(A1:A7,"Active")

I have a question that I hope someone can help with.

A B C

1 ACTIVE 11.88% _______ Average
2 ACTIVE

3 ACTIVE 12.80%
4 ACTIVE

5 ACTIVE 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09%

If I wanted to get an average in cell C1 of all the cells in Column B1:B5
that read active in Column A1:A5 how would I write that formula?



  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 54
Default Formula Help

There are a few things that you can do. The most simple would be to change
the cells in column A to "Inactive" for those rows in column B that are empty.

A B C

1 ACTIVE 11.88% _______ Average
2 INACTIVE
3 ACTIVE 12.80%
4 INACTIVE
5 ACTIVE 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09%

The second way would be to insert a new column between B & C and fill the
following formula down for the entire range:
=IF(AND(A1="Active",OR(B1<"",B1<0)),B1,"")
That formula basically says, if the cell is Active and the value isn't 0 or
empty, then return the original value, otherwise return a zero-length string.
Then, instead of the SumIF statement that you were using, you can simply use
the AVERAGE function on the new range of numbers.
=AVERAGE(C1:C7)

A B C
D

1 ACTIVE 11.88% 11.88%
_______ Average
2 ACTIVE
3 ACTIVE 12.80% 12.80%
4 ACTIVE
5 ACTIVE 14.67% 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09% 45.09%

Hope this helps.

-Cory

"Excel for Dummies" wrote:

The below formula was provided for the question below, can someone tell me

how to add into the formula how to not include cells missing information so
that it does take those cells into account when calculating the average in
cell C1?

=SUMIF(A1:A7,"Active",B1:B7)/COUNTIF(A1:A7,"Active")

I have a question that I hope someone can help with.

A B C

1 ACTIVE 11.88% _______ Average
2 ACTIVE

3 ACTIVE 12.80%
4 ACTIVE

5 ACTIVE 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09%

If I wanted to get an average in cell C1 of all the cells in Column B1:B5
that read active in Column A1:A5 how would I write that formula?



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Formula Help

I need to leave those cells ACTIVE, because they are showing that the account
is still active, but we are just waiting on information to insert in the
blank cells. So, I just need to add something to the formula that will
discard the cells missing information from the average calucation, until
there is information inserted. So another words a running average
calculation. Right now it is adding the cells missing information when
calculating the average of column B, and it is providing me an inaccurate
average.


"Cory" wrote:

There are a few things that you can do. The most simple would be to change
the cells in column A to "Inactive" for those rows in column B that are empty.

A B C

1 ACTIVE 11.88% _______ Average
2 INACTIVE
3 ACTIVE 12.80%
4 INACTIVE
5 ACTIVE 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09%

The second way would be to insert a new column between B & C and fill the
following formula down for the entire range:
=IF(AND(A1="Active",OR(B1<"",B1<0)),B1,"")
That formula basically says, if the cell is Active and the value isn't 0 or
empty, then return the original value, otherwise return a zero-length string.
Then, instead of the SumIF statement that you were using, you can simply use
the AVERAGE function on the new range of numbers.
=AVERAGE(C1:C7)

A B C
D

1 ACTIVE 11.88% 11.88%
_______ Average
2 ACTIVE
3 ACTIVE 12.80% 12.80%
4 ACTIVE
5 ACTIVE 14.67% 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09% 45.09%

Hope this helps.

-Cory

"Excel for Dummies" wrote:

The below formula was provided for the question below, can someone tell me

how to add into the formula how to not include cells missing information so
that it does take those cells into account when calculating the average in
cell C1?

=SUMIF(A1:A7,"Active",B1:B7)/COUNTIF(A1:A7,"Active")

I have a question that I hope someone can help with.

A B C

1 ACTIVE 11.88% _______ Average
2 ACTIVE

3 ACTIVE 12.80%
4 ACTIVE

5 ACTIVE 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09%

If I wanted to get an average in cell C1 of all the cells in Column B1:B5
that read active in Column A1:A5 how would I write that formula?



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 15,768
Default Formula Help

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=AVERAGE(IF((A1:A7="Active")*(ISNUMBER(B1:B7)),B1: B7))

Format as %

Biff

"Excel for Dummies" wrote in
message ...
The below formula was provided for the question below, can someone tell
me

how to add into the formula how to not include cells missing information
so
that it does take those cells into account when calculating the average in
cell C1?

=SUMIF(A1:A7,"Active",B1:B7)/COUNTIF(A1:A7,"Active")

I have a question that I hope someone can help with.

A B C

1 ACTIVE 11.88% _______ Average
2 ACTIVE

3 ACTIVE 12.80%
4 ACTIVE

5 ACTIVE 14.67%
6 INACTIVE 22.90%
7 ACTIVE 45.09%

If I wanted to get an average in cell C1 of all the cells in Column B1:B5
that read active in Column A1:A5 how would I write that formula?





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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


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