Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Conditional averaging gives wrong result

I've got a problem in a spreadsheet which, if I simplify down to its most
basic is as follows.

In the table below, the average value of column B where the corresponding
value in column A is "A" should be 100. Yet the answer I get with the
following array formula is 33.3333

={AVERAGE((A1:A3="A")*(G32:G34))}

A 100
B 200
C 300


It appears that excel is recognising the correct value for the condition
equal to A (100) but then assigning zeros to the other before calculating.

Have I got the wrong syntax in that formula. Any suggestions to calculate
the correct answer.

Tx


Rob


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Conditional averaging gives wrong result

Try:
=AVERAGE(IF(.........))

ctrl+shift+enter, not just enter


"BRob" wrote:

I've got a problem in a spreadsheet which, if I simplify down to its most
basic is as follows.

In the table below, the average value of column B where the corresponding
value in column A is "A" should be 100. Yet the answer I get with the
following array formula is 33.3333

={AVERAGE((A1:A3="A")*(G32:G34))}

A 100
B 200
C 300


It appears that excel is recognising the correct value for the condition
equal to A (100) but then assigning zeros to the other before calculating.

Have I got the wrong syntax in that formula. Any suggestions to calculate
the correct answer.

Tx


Rob



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Conditional averaging gives wrong result

As an array formula, committed by pressing Ctrl-Shift-Enter

=average(if(A1:a3="A",G32:G34))

"BRob" wrote:

I've got a problem in a spreadsheet which, if I simplify down to its most
basic is as follows.

In the table below, the average value of column B where the corresponding
value in column A is "A" should be 100. Yet the answer I get with the
following array formula is 33.3333

={AVERAGE((A1:A3="A")*(G32:G34))}

A 100
B 200
C 300


It appears that excel is recognising the correct value for the condition
equal to A (100) but then assigning zeros to the other before calculating.

Have I got the wrong syntax in that formula. Any suggestions to calculate
the correct answer.

Tx


Rob



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Conditional averaging gives wrong result

BRob wrote:
I've got a problem in a spreadsheet which, if I simplify down to its most
basic is as follows.

In the table below, the average value of column B where the corresponding
value in column A is "A" should be 100. Yet the answer I get with the
following array formula is 33.3333

={AVERAGE((A1:A3="A")*(G32:G34))}

A 100
B 200
C 300


It appears that excel is recognising the correct value for the condition
equal to A (100) but then assigning zeros to the other before calculating.

Have I got the wrong syntax in that formula. Any suggestions to calculate
the correct answer.

Tx


Rob




{=AVERAGE(IF(A1:A3="A",G32:G34,""))}
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
excel result return wrong calcuation result garyww Excel Worksheet Functions 1 August 14th 06 11:14 AM
excel result return wrong calcuation result garyww Excel Worksheet Functions 0 August 14th 06 05:02 AM
excel result return wrong calcuation result garyww Excel Worksheet Functions 0 August 14th 06 05:02 AM
Need help with averaging a time but dates are messing up the result I am trying for. chadsxe Excel Worksheet Functions 6 June 15th 06 06:39 PM
sumif wrong result tallyman00 Excel Worksheet Functions 6 December 29th 05 05:11 PM


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