PC Review


Reply
Thread Tools Rate Thread

Average (follow on)

 
 
Sandy
Guest
Posts: n/a
 
      16th Aug 2007
Why does this:-

=IF($A$29=0,0,IF($A$2="",0,SUMIF(OFFSET(A31,,,$A$29,1),$A$2,OFFSET(F31,,,$A$29,1))))/$A$29

produce a different result tothis?:-

=IF($A$29=0,0,IF($A$2="",0,SUMIF($A$31:$A$3000,$A$2,F31:F3000)))/$A$29

where $A$2 is "Red" and $A$29 is "=Countif(A31:A3000,A2).

Sandy


 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      16th Aug 2007
The difference is that both formulas are using different sized ranges.

>$A$29 is "=Countif(A31:A3000,A2).


Suppose the result of that COUNTIF = 10

The formula that uses OFFSET is only using the range A31:A40 and F31:F40.

The other formula is using the range A31:A3000 and F31:F3000.

--
Biff
Microsoft Excel MVP


"Sandy" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Why does this:-
>
> =IF($A$29=0,0,IF($A$2="",0,SUMIF(OFFSET(A31,,,$A$29,1),$A$2,OFFSET(F31,,,$A$29,1))))/$A$29
>
> produce a different result tothis?:-
>
> =IF($A$29=0,0,IF($A$2="",0,SUMIF($A$31:$A$3000,$A$2,F31:F3000)))/$A$29
>
> where $A$2 is "Red" and $A$29 is "=Countif(A31:A3000,A2).
>
> Sandy
>



 
Reply With Quote
 
Sandy
Guest
Posts: n/a
 
      16th Aug 2007
Yes, but all the rows below the countif figure are blank so surely the
answers should be the same.
Sandy

"T. Valko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The difference is that both formulas are using different sized ranges.
>
>>$A$29 is "=Countif(A31:A3000,A2).

>
> Suppose the result of that COUNTIF = 10
>
> The formula that uses OFFSET is only using the range A31:A40 and F31:F40.
>
> The other formula is using the range A31:A3000 and F31:F3000.
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "Sandy" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Why does this:-
>>
>> =IF($A$29=0,0,IF($A$2="",0,SUMIF(OFFSET(A31,,,$A$29,1),$A$2,OFFSET(F31,,,$A$29,1))))/$A$29
>>
>> produce a different result tothis?:-
>>
>> =IF($A$29=0,0,IF($A$2="",0,SUMIF($A$31:$A$3000,$A$2,F31:F3000)))/$A$29
>>
>> where $A$2 is "Red" and $A$29 is "=Countif(A31:A3000,A2).
>>
>> Sandy
>>

>
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      16th Aug 2007
What data gives different values, I get the same?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sandy" <(E-Mail Removed)> wrote in message
news:u%(E-Mail Removed)...
> Yes, but all the rows below the countif figure are blank so surely the
> answers should be the same.
> Sandy
>
> "T. Valko" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> The difference is that both formulas are using different sized ranges.
>>
>>>$A$29 is "=Countif(A31:A3000,A2).

>>
>> Suppose the result of that COUNTIF = 10
>>
>> The formula that uses OFFSET is only using the range A31:A40 and F31:F40.
>>
>> The other formula is using the range A31:A3000 and F31:F3000.
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "Sandy" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Why does this:-
>>>
>>> =IF($A$29=0,0,IF($A$2="",0,SUMIF(OFFSET(A31,,,$A$29,1),$A$2,OFFSET(F31,,,$A$29,1))))/$A$29
>>>
>>> produce a different result tothis?:-
>>>
>>> =IF($A$29=0,0,IF($A$2="",0,SUMIF($A$31:$A$3000,$A$2,F31:F3000)))/$A$29
>>>
>>> where $A$2 is "Red" and $A$29 is "=Countif(A31:A3000,A2).
>>>
>>> Sandy
>>>

>>
>>

>
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      16th Aug 2007


"T. Valko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> The difference is that both formulas are using different sized ranges.


both are different? I thought only one was different <g>.


 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      16th Aug 2007
Only if ALL the values in A31:A{lastrow} = A2.

You might be better off using this array-formula (CTRL-SHIFT-ENTER, or
CMD-RETURN):

=IF($A$29=0,0,AVERAGE(IF($A$31:$A$3000=A2,$F$31:$F$3000))

In article <u#(E-Mail Removed)>,
"Sandy" <(E-Mail Removed)> wrote:

> Yes, but all the rows below the countif figure are blank so surely the
> answers should be the same.

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      16th Aug 2007
Ok, then what results are you getting from both formulas?

--
Biff
Microsoft Excel MVP


"Sandy" <(E-Mail Removed)> wrote in message
news:u%(E-Mail Removed)...
> Yes, but all the rows below the countif figure are blank so surely the
> answers should be the same.
> Sandy
>
> "T. Valko" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> The difference is that both formulas are using different sized ranges.
>>
>>>$A$29 is "=Countif(A31:A3000,A2).

>>
>> Suppose the result of that COUNTIF = 10
>>
>> The formula that uses OFFSET is only using the range A31:A40 and F31:F40.
>>
>> The other formula is using the range A31:A3000 and F31:F3000.
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "Sandy" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Why does this:-
>>>
>>> =IF($A$29=0,0,IF($A$2="",0,SUMIF(OFFSET(A31,,,$A$29,1),$A$2,OFFSET(F31,,,$A$29,1))))/$A$29
>>>
>>> produce a different result tothis?:-
>>>
>>> =IF($A$29=0,0,IF($A$2="",0,SUMIF($A$31:$A$3000,$A$2,F31:F3000)))/$A$29
>>>
>>> where $A$2 is "Red" and $A$29 is "=Countif(A31:A3000,A2).
>>>
>>> Sandy
>>>

>>
>>

>
>



 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      16th Aug 2007
Argh! <bg>

--
Biff
Microsoft Excel MVP


"Bob Phillips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> "T. Valko" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> The difference is that both formulas are using different sized ranges.

>
> both are different? I thought only one was different <g>.
>



 
Reply With Quote
 
Sandy
Guest
Posts: n/a
 
      16th Aug 2007
Yes that does the trick - Thanks once again
Sandy

"JE McGimpsey" <(E-Mail Removed)> wrote in message
news:jemcgimpsey-(E-Mail Removed)...
> Only if ALL the values in A31:A{lastrow} = A2.
>
> You might be better off using this array-formula (CTRL-SHIFT-ENTER, or
> CMD-RETURN):
>
> =IF($A$29=0,0,AVERAGE(IF($A$31:$A$3000=A2,$F$31:$F$3000))
>
> In article <u#(E-Mail Removed)>,
> "Sandy" <(E-Mail Removed)> wrote:
>
>> Yes, but all the rows below the countif figure are blank so surely the
>> answers should be the same.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do Follow Up flagged items not show in my Follow Up folder Cessford Microsoft Outlook Discussion 1 8th Jan 2010 02:00 PM
Outlook mail flagged for follow up don't show in For Follow Up Denny356 Microsoft Outlook Discussion 1 21st Dec 2009 07:21 PM
Follow-up: Dynamic 90 Day Running Average =?Utf-8?B?QWRtaXJhbCBPLiBGLiBEb29t?= Microsoft Access Queries 4 30th May 2007 02:30 AM
Average "IF" Follow-On Question carl Microsoft Excel Worksheet Functions 4 20th Apr 2004 03:47 PM
Re: Follow-up Flag doesn't remind me to follow-up Sue Mosher [MVP-Outlook] Microsoft Outlook Discussion 0 8th Mar 2004 04:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:21 AM.