Using Average Time value but exlude 0:00 -- PLease Help

ccofmars

New Member
Joined
May 20, 2010
Messages
44
Hi to you all,

I thank you in advance for taking the time to help me with this.

I am trying to do average of timevalue but I would like to exclude the cells where the time is 0:00 (h:mm)

the formula I am using is:
{=average(timevalue(right(I6:I3344,7)))}

It does work but unfortunally it also includes all the cells with 0:00 which gives me an average of 0:00 when I need to exclude these cells

how can I exclude 0:00 from the average? thank you thank you thank you :pray:
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,213
If you are using Excel 2003 or earlier enter this formula with Ctrl + Shift + Enter (not just Enter):

=AVERAGE(IF(I6:I3344<>0,I6:I3344))

Here is an example:
Excel Workbook
D
80.0625
Sheet3
Excel 2010
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.


If you are using Excel 2007 or 2010 try this formula:

=AVERAGEIF(I6:I3344,"<>0")
Excel Workbook
D
90.0625
Sheet3
Excel 2010
Cell Formulas
RangeFormula
D9=AVERAGEIF(I6:I3344,"<>0")
 

ccofmars

New Member
Joined
May 20, 2010
Messages
44
HI Mike, thank you for repsonding. I am using Excel 2003 and I also enter/ctrl/shift to enter my formula.

I see what you mean with your fomula but for whatever reason, because of the formating of the column, when I use =AVERAGE(IF(I6:I3344<>0,I6:I3344)), I get #DIV/0!

i need to be able to include the timevaluefunction in the formula and that would totally work! thank you in advance :)

(hope i make sense :p)
 

ccofmars

New Member
Joined
May 20, 2010
Messages
44
Dont know if I was clear, but I am average time and the cell format in the column is General. so {=average(timevalue(I6:I3344,7)))} works but {=AVERAGE(IF(I6:I3344<>0,I6:I3344))} does not because of the timevalue function i need to add into it.
 

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,213

ADVERTISEMENT

If you mean the values are text,

Maybe try this:

=AVERAGE(IF(I6:I3344+0<>0,I6:I3344+0))

Ctrl + Shift + Enter (not just Enter)

The "+0" should take the text times and make them real times.
 

ccofmars

New Member
Joined
May 20, 2010
Messages
44
ok so I tried what you suggested (thank you again by the way :) )
I am getting the following: #VALUE!

to give you an idea, my spreadsheet looks like this:
00:00
00:00
00:00
00:00
00:00
01:15
00:00
00:00
02:33 etc...........

if i right-click on the cells, the format is "general"
and i need to average these 3343 rows (of time hour:minute) and exclude the 00:00.

when i used this formula =average(timevalue(right(I6:I3344,7))) ctrl/shift/enter, it worked fine but the formula includes the 00:00.

I need to find away to be able to be able to average a time value and exclude all the 00:00.

thank you :)
 

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,213

ADVERTISEMENT

Are there AMs and PMs in the column of times? I see 5 characters when you wrote 00:00, 02:00. What is the 7 doing in your formula?
 

ccofmars

New Member
Joined
May 20, 2010
Messages
44
No there are no AMs and PMs in the column of times. Regarding the 7, I got this formula online. Not sure what it is but it works :)
 

ccofmars

New Member
Joined
May 20, 2010
Messages
44
HI Barry

Yes I did use Mike's suggestion and the result was #DIV/0!

Do you know if I can find a way to do an average time value and include a If statement that would exclude all the 00:00 in the column?

thank you
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,712
Messages
5,512,994
Members
408,928
Latest member
Black Vinyl

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top