Calculation Issues

How to Fix Excel Negative Time Results Showing as Hash Marks

Rana GarciaRana Garcia Nov 11, 2026 869 views

Question details

The user needs to display a correct time from the previous day without Excel showing hash marks (######) when a time calculation or time-zone conversion results in a negative value.

How to Fix Excel Negative Time Results Showing as Hash Marks
Product
Spreadsheet
Device & OS
not provided
Scenario
Subtracting time or converting time zones where the resulting time drops below zero and falls into the previous day.
Observed behavior
The spreadsheet displays a string of hash marks (######) instead of the calculated time because the resulting time value is negative.
Before you start

Ensure that the cell containing your calculated result is formatted specifically as 'Time'. Spreadsheets using the default 1900 date system cannot process negative times, which triggers the hash mark error.

Solution 1Recommended

Use the MOD Function to Handle Negative Time

Applying the MOD function ensures the calculated time remains within a valid 24-hour period, preventing the formula from returning negative values.

Spreadsheets store dates and times as serial numbers where the value 1 equals 24 hours. When subtracting time (such as a time-zone offset), the result might drop below zero, causing the application to display hashes (######). Using the MOD function with a divisor of 1 forces the negative decimal back into a valid positive time component representing the correct time on the previous day.

1
Select the target cell

Click on the cell where you want the calculated time to appear.

2
Enter the MOD formula

Type the formula using the MOD function. For example, to subtract 1 hour (represented as 1/24) from cell D10, type =MOD(1+D10-(1/24), 1).

3
Apply the calculation

Press Enter to apply the formula and view the numeric result.

4
Format the result as Time

Right-click the cell, choose 'Format Cells', navigate to the 'Number' tab, and apply a 'Time' format to display the result correctly.

Use the MOD Function to Handle Negative Time
Formula Explanation: Adding 1 to the calculation offsets the negative value by a full day, and using MOD with a divisor of 1 strips away any whole days, leaving only the correct time of day.
Manage Spreadsheets Efficiently

Perform Advanced Time Calculations in WPS Spreadsheet

WPS Spreadsheet fully supports complex time calculations, including the MOD function, allowing you to seamlessly manage time-zone conversions, payroll, and shift schedules without encountering negative time formatting errors.

  1. 1. Open your time data: Launch WPS Spreadsheet and open the document containing the time values you need to convert or subtract.
  2. 2. Apply the time conversion formula: In your target cell, input the time conversion formula such as =MOD(1+A1-(1/24),1) to offset negative hours safely.
  3. 3. Format cell as Time: Right-click the selected cell, click 'Format Cells', go to the 'Number' tab, and choose 'Time' to display the results accurately.
100% compatible with Microsoft Excel formulas like MOD, TEXT, and TIME.Intuitive cell formatting options for precise date and time displays.Free, lightweight, and fast-loading spreadsheet editor for everyday tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my spreadsheet show ###### for negative times?

By default, spreadsheets use the 1900 date system, which does not support negative dates or times. When a calculation (like subtracting an hour from 12:30 AM) results in a negative value, the application cannot render it as a standard time and displays hash marks (######) instead.

Can I change a setting to display negative times without using formulas?

Yes, you can switch to the 1904 date system to allow negative times. Go to File > Options > Advanced, scroll down to the section 'When calculating this workbook', and check 'Use 1904 date system'. Be aware that this will shift all existing dates in your workbook by four years, so it is usually safer to use the MOD formula.

How do I safely subtract hours from a time value?

To subtract a specific number of hours, you can divide the hours by 24 to convert them into a standard serial number. For example, to subtract 3 hours from cell A1, use the formula =A1 - (3/24). If the result might cross midnight into the previous day, wrap it in the MOD function: =MOD(1+A1-(3/24), 1).