提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何在Excel中正确显示/显示负面时间?

当您从较早的时间12:20中减去稍后的时间10:15时,我们中的一些人可能会遇到此问题,您将得到如下所示的截图显示的结果######错误。 在这种情况下,你怎么能在Excel中正常和正常地显示负面时间?

DOC-显示阴性,time1-2DOC-显示阴性,time2

在更改Excel的默认日期系统时正确显示负时间

利用公式正确显示负时间


好主意转换时间

Kutools' 转换时间 工具可以 快速将时间转换为十进制小时,分钟,秒。
doc转换时间1
时间到十进制小时
时间到小数分钟
时间到小数秒
doc转换时间2
doc转换时间3
doc转换时间4

箭头蓝色右泡在更改Excel的默认日期系统时正确显示负时间


通过将Excel的默认日期系统更改为1904日期系统,您可以轻松快捷地在Excel中显示负面时间。 请这样做:

Kutools for Excel, 与超过 120 方便的Excel功能,提高工作效率,节省工作时间。

1。 打开 Excel选项 单击对话框 文件 > 期权 在Excel 2010 / 2013中,然后单击 办公室按钮 > Excel选项 在Excel 2007中。

2。 然后在 Excel选项 对话框,单击 高级 从左窗格中,在右侧部分,检查 使用1904日期系统计算此工作簿时 部分。 看截图:

DOC-显示阴性,time1

3。 完成设置后,单击 OK。 负面时间将立即正确显示,请参阅屏幕截图:

DOC-显示阴性,time1-2DOC-显示阴性,time2


箭头蓝色右泡利用公式正确显示负时间

如果您不想更改日期系统,则还可以使用以下公式来解决此任务。

Kutools for Excel, 与超过 120 方便的Excel功能,提高工作效率,节省工作时间。

1。 输入你想要计算它们的日期,然后输入这个公式 = TEXT(MAX($ A $ 1:$ A $ 2)-MIN($ A $ 1:$ A $ 2), “ - ħ:: MM”) (A1和A2分别表示两个时间单元格)放入空白单元格中。 看截图:

DOC-显示阴性,time1

2。 然后按 输入 键,你将得到如下所示的正确结果:

DOC-显示阴性,time1

提示:

这里有另一个公式也可以帮助你: = IF(A2-A1 <0,“ - ”&TEXT(ABS(A2-A1),“hh:mm”),A2-A1)

在这个公式中, A2 表示时间较短,而且 A1 代表更大的时间。 您可以根据需要更改它们。


改变Vlaues的Sige (迅速将负值改为正值,反之亦然...)

文档更改标志

Kutools for Excel - 最佳办公生产力工具提高80%的生产力

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能60天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    shalene · 1 years ago
    i have a date from someone elses file showing as "20171229" i need it to look like "12/29/2017".. PLEASE HELP!
    • To post as a guest, your comment is unpublished.
      John M · 1 years ago
      =date(left(A1,4),mid(A1,5,2),right(A1,2)
      Where A1 is the cell containing the date.

      The new cell will contain an excel date value for that day,
      right click the new cell, and select the date format you want.
  • To post as a guest, your comment is unpublished.
    JS · 2 years ago
    I have a negative time value in a cell, say CQ15. [ i got the value using the above mentioned formula =IF(A2-A1<0, "-" & TEXT(ABS(A2-A1),"hh:mm"), A2-A1) ]

    Next, I'm trying to multiply the cell value with 5, ie. CQ15*5.
    But not getting any result.
    I have tried both the following formulas:
    =TEXT(CQ15*5, "[h]:m:ss")
    &
    =IF(CQ15*5<0, "-" & TEXT(ABS(CQ15*5),"[h]:m:ss"),CQ15*5)

    In both cases, i received #VALUE!

    Can anyone please help me with this.
    • To post as a guest, your comment is unpublished.
      KulGery · 1 years ago
      Couse CQ15 is a text cell. For calculate with it, you must format it as time value.
      =IF(LEFT(CQ15,1)="-", -TIMEVALUE(RIGHT(CQ15,LEN(CQ15)-1)), TIMEVALUE(CQ15))
  • To post as a guest, your comment is unpublished.
    bo ek · 2 years ago
    thank you so much! You just saved my day!
  • To post as a guest, your comment is unpublished.
    Meg · 2 years ago
    I am trying to calculate a negative formula for shift time not fully worked. Say data is as follows:
    A1 = 07:30 shift start, minus
    A2 = 1:00 lunch break
    A3 = 16:30 shift ends
    Then A4 = 8:00 hours worked during the day.
    But, should the worker leave earlier, say 17:00, what is the formula in cell A5 that shows how much short the person's shift was?
    • To post as a guest, your comment is unpublished.
      Marc Kupper · 2 years ago
      [quote name="Meg"]I am trying to calculate a negative formula for shift time not fully worked. Say data is as follows:
      A1 = 07:30 shift start, minus
      A2 = 1:00 lunch break
      A3 = 16:30 shift ends
      Then A4 = 8:00 hours worked during the day.
      But, should the worker leave earlier, say 17:00, what is the formula in cell A5 that shows how much short the person's shift was?[/quote]

      You can't directly display a negative time in Excel. However, you can display it using the TEXT() function. For example

      Cell A4 would have =A3-A1-A2 which will display the hours/minutes worked.
      Cell A5 would have 8:00 which is the number of hours you expect this person to work
      Cell A6 would have =IF(A5=A4,"Met expected target",IF(A4
  • To post as a guest, your comment is unpublished.
    MND · 4 years ago
    "Tip:

    Here is another formula also can help you: =IF(A2-A1
  • To post as a guest, your comment is unpublished.
    Ralf · 4 years ago
    If you switch to 1904 all dates in the workbook change. Not a solution. What is this 1904 thing anyway?
    • To post as a guest, your comment is unpublished.
      Marc Kupper · 4 years ago
      [quote name="Ralf"]If you switch to 1904 all dates in the workbook change. Not a solution. What is this 1904 thing anyway?[/quote]

      The 1904 format comes from Excel version 1.0 which was on the Macintosh. Two years later Microsoft released Excel for Windows and with with that release introduced the "1900" date format. Excel for the Mac continued to default to the 1904 format and Windows defaults to the 1900 format. Both versions can switch to the other format but doing so will cause all dates in a workbook to shift.

      The year 1900 was special in that though it's divisible by 4 it was not a leap year. The Mac's clock hardware did not have the extra logic needed to handle this special case and so Apple simplified the design by allowing for dates from 1904 (the first leap year in the century) on out. As Excel was first written for the Mac it was natural that Excel would use the Mac's date format.

      The developers of Excel for Windows used the 1900 format for backwards compatibility with SuperCalc and Lotus 1-2-3 which were the dominate spreadsheet applications in the MS-DOS and Windows markets at the time.

      The 1904 and 1900 formats are nearly identical. The 1904 format stores dates as the number of days since 1/1/1904 and the 1900 format is the number of days since 1/1/1900. You can convert a 1904 date to a 1900 date by adding 1,462 to a cell's value and subtracting 1,462 to convert the other way.

      Apparently the developers of Excel for the Mac included code to support negative time values. The coders of Excel for Windows did not support negative time values. Modern versions of Excel still include two separate chunks of code with one dealing with 1904 dates and the other for 1900 dates. They never fixed the 1900 code to support display of negative time values.
      • To post as a guest, your comment is unpublished.
        Ralf · 4 years ago
        Thanks for the history lesson, Marc. Much clearer now how it came to this. Still leaves me wondering about your last sentence: "They never fixed ..." I don't get it. Would it be so hard to fix? So I still need to use Libre Office for two things: negative times and CSV export. Must be exotic niche features ...
  • To post as a guest, your comment is unpublished.
    sk · 4 years ago
    Hello, any idea of how to do sum of negative hours which are in hh:mm format?


    for example
    -01:00 is at A1 column, -02:00 is at A2 column, -03:00 is at A3 column.
    I used "if" command to sum up the three columns (A1,A2,A3) but showing 0:00
    if command "if(A1:A3
    • To post as a guest, your comment is unpublished.
      ExelWizard · 2 years ago
      Couldn't you just multiply the numbers by -1 to start, add them up then multiply by -1 again?