zrx1200

Well-known Member
Joined
Apr 14, 2010
Messages
622
Office Version
  1. 2019
Platform
  1. Windows
Trying to use mode on data with negatives times.

-0:11#value !
-0:06#value !
-0:03#value !
-0:05#value !
0.010:08
0.000:00
0.000:01

The #value is removing the seconds if present

formula [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]INT(CJ15*1440)/1440
I'm removing seconds as I thought it was affecting the mode function, but it in itself has the #value error.

So, do you need to condition times before mode will work with positive and negative times data set? [/FONT]


<colgroup><col span="2"></colgroup><tbody>
</tbody>

 
Update:

System NOT in 1904 apparently.

This formula is giving me the negatives and "text" as that's what I'm telling it do, duh....

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]IF(S13="Remove/Post",O13-T13,IFERROR(IF((Q13+"00:00:01")-O13<0,"-"&TEXT(ABS((Q13+"00:00:01")-O13),"h:mm"),(Q13+"00:00:01")-O13),""))

So if I put formula to this.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]IF(S13="Remove/Post",O13-T13,IFERROR(IF((Q13+"00:00:01")-O13<0,(Q13+"00:00:01")-O13,(Q13+"00:00:01")-O13),""))

+ numbers good
- numbers ############## which one would expect as excel no like negative times.

So, i then tried a helper column to do an ABS on the ########## cells to no avail.
[/FONT]<strike>
</strike>
[/FONT]
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
It would appear that this is correct.

IT can be confirmed by attempting to change the format using the dropdown in the middle of the 'Home' tab on the excel ribbon. If the example value is the same under all of the formats listed in the dropdown then it is text, if it varies between the different formats then it is numeric.

Try this in a helper column to coerce the times into numbers, then get the mode from the helper.

=SUBSTITUTE(CJ15,"-","")*IF(LEFT(CJ15,1)="-",-1,1)

I think that should work as long as you have 1904 dates selected in advanced options. I've got it working, but not tested thoroughly.

edit:-

[h]:mm or h:mm should make no difference, it only affects how the times over 24 hours are displayed.

MODE will show N/A if there is no mode (no value that appears more than once).

So, had to modify your formula form this

=SUBSTITUTE(CJ15,"-","")*IF(LEFT(CJ15,1)="-",-1,1)

to this

=SUBSTITUTE(CJ15,"-","")*IF(LEFT(CJ15,1)="-",1,1)
<strike>
</strike>

Then for averaging and mode averaging for + and - numbers I did separate averages and mode just keeping in mined with are negative and positive.

Seems to work.
 
Upvote 0
Try the helper formula formatted as number / general instead of time, that should allow mode and average to work with negatives.
 
Upvote 0

Forum statistics

Threads
1,215,056
Messages
6,122,907
Members
449,096
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top