A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SUMIF using value from MOD function



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 11:33 PM posted to microsoft.public.excel.worksheet.functions
Steve Vincent
external usenet poster
 
Posts: 97
Default SUMIF using value from MOD function

Hello,

I want to conditionally average a range of cells that are formatted in
elapsed time (e.g., 1:03 hrs/min ) but that actually contain a function (
=MOD(G3-E3,1) ). When I refer to these cells containing the MOD functions in
my range (I'm using AVERGEIF), it simply returns my "criteria" value.

Here is my function:

=AVERAGEIF(J3:J17,0.0416666666666667)

where J3:J17 contain the function =MOD(G3-E3,1) , etc., and are formatted in
the hrs/min format. I'm using 0.0416666666666667 as the criteria, because
that is the number for "one hour". In other words, I only want to average
the values that are greater than one hour.

Any ideas why my function isn't working? Or what would be a good way to
conditionally average a range of "times" greater than one hour?

TIA,
Steve
  #2  
Old May 18th, 2010, 12:33 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default SUMIF using value from MOD function

Hi,

try this

=SUMIF(C3:C8,"=0.04")/COUNTIF(C3:C8,"=0.04")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Steve Vincent" wrote in message
...
Hello,

I want to conditionally average a range of cells that are formatted in
elapsed time (e.g., 1:03 hrs/min ) but that actually contain a function (
=MOD(G3-E3,1) ). When I refer to these cells containing the MOD functions
in
my range (I'm using AVERGEIF), it simply returns my "criteria" value.

Here is my function:

=AVERAGEIF(J3:J17,0.0416666666666667)

where J3:J17 contain the function =MOD(G3-E3,1) , etc., and are formatted
in
the hrs/min format. I'm using 0.0416666666666667 as the criteria, because
that is the number for "one hour". In other words, I only want to average
the values that are greater than one hour.

Any ideas why my function isn't working? Or what would be a good way to
conditionally average a range of "times" greater than one hour?

TIA,
Steve


  #3  
Old May 18th, 2010, 01:11 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default SUMIF using value from MOD function

I only want to average the values
that are greater than one hour.


Try this...

=AVERAGEIF(J3:J17,""&TIME(1,0,0))


--
Biff
Microsoft Excel MVP


"Steve Vincent" wrote in message
...
Hello,

I want to conditionally average a range of cells that are formatted in
elapsed time (e.g., 1:03 hrs/min ) but that actually contain a function (
=MOD(G3-E3,1) ). When I refer to these cells containing the MOD functions
in
my range (I'm using AVERGEIF), it simply returns my "criteria" value.

Here is my function:

=AVERAGEIF(J3:J17,0.0416666666666667)

where J3:J17 contain the function =MOD(G3-E3,1) , etc., and are formatted
in
the hrs/min format. I'm using 0.0416666666666667 as the criteria, because
that is the number for "one hour". In other words, I only want to average
the values that are greater than one hour.

Any ideas why my function isn't working? Or what would be a good way to
conditionally average a range of "times" greater than one hour?

TIA,
Steve



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.