Excel errors

##### in Excel: why cells show hash signs and how to fix it

Cells full of ##### in Excel: column too narrow, negative times across midnight, negative date differences, numbers beyond 9999-12-31. Fixes for each.

A cell full of hash signs, #####, is the one "error" in Excel that is not an error at all. The value in the cell is perfectly fine; Excel simply cannot display it. Either the column is too narrow for the number or date, or the value is a negative date or time, which Excel has no way to show as a date. Formulas that refer to the cell keep working with the real value, and ISERROR returns FALSE for it. This page covers each situation, with a small sheet that reproduces it and the fix. For the real error values see Formula errors: what each one means and how to fix it.

What ##### means

Excel never cuts a number in half, because a truncated number would be a wrong number. Text can spill over into empty neighbouring cells, but numbers, dates and times cannot. When a formatted number does not fit, Excel shows hash marks across the cell instead. (A number in the General format is first shown with fewer decimals or in scientific notation; hashes appear when even that does not fit.) Separately, dates and times in Excel are positive serial numbers counting from 1 January 1900, so a negative result formatted as a date or time cannot be displayed at any width, and also shows hashes.

Tip. Hover over a ##### cell: Excel shows the real value in a tooltip. The formula bar shows the underlying value or formula too.

Cause 1: the column is too narrow

A sales total formatted with a thousands separator needs more room than the column offers:

D2fx=B2*C2
ABCD
1ProductUnitsPriceRevenue
2Laptops5002500########

500 × 2,500 = 1,250,000 does not fit in the narrow column D with its number format.

Result: ########

D2fx=B2*C2
ABCD
1ProductUnitsPriceRevenue
2Laptops50025001,250,000

After AutoFit the full value appears (formatted with a thousands separator).

Result: 1,250,000

Fix. Double-click the boundary on the right of the column letter to AutoFit the column, or select columns and use Home › Format › AutoFit Column Width (Alt, H, O, I on Windows). To fix every column at once, press Ctrl+A and double-click any column boundary. Other options:

  • Use a shorter number format: fewer decimals, no currency symbol, or a format in thousands such as #,##0,"k", which shows 1,250k.
  • Format Cells › Alignment › Shrink to fit reduces the font size to fit the column; good for a fixed layout, bad for readability if the numbers grow.
  • Long date formats such as dddd, d mmmm yyyy need much more width than 2026-03-15; switch to a short format in tight tables.
  • Bold text and larger fonts need more width; a column that fits on screen may still show ##### after a style change or when printed with a different printer font.

Cause 2: a negative time (shifts across midnight)

Working hours are often calculated as End minus Start. For a night shift that ends after midnight the subtraction is negative, and a negative time cannot be displayed:

C2fx=B2-A2
ABC
1StartEndHours
222:0006:00########

6:00 minus 22:00 is -16 hours, which Excel cannot show as a time.

Result: ########

C2fx=MOD(B2-A2, 1)
ABC
1StartEndHours
222:0006:008:00

MOD with 1 adds a day when the result is negative: -16 hours + 24 = 8 hours (formatted as h:mm).

Result: 8:00

=MOD(B2-A2, 1) works for every shift shorter than 24 hours, whether or not it crosses midnight. An alternative is =B2-A2+(B2<A2), which adds 1 (one day) only when End is earlier than Start. To total many shifts that exceed 24 hours, format the total with [h]:mm so it shows 50:30 rather than wrapping around to 2:30. More in Dates and times: serial numbers, date math and working days.

Cause 3: a negative date difference formatted as a date

When you subtract one date from another, Excel sometimes formats the result as a date automatically. If the result is negative, for example when a payment arrived before its due date, you see hashes:

C3fx=B3-A3
ABC
1DuePaidDays late
22026-03-102026-03-15
32026-03-202026-03-15########

-5 formatted as a date cannot be displayed.

Result: ########

C3fx=B3-A3
ABC
1DuePaidDays late
22026-03-102026-03-15
32026-03-202026-03-15-5

After changing the format of C3 to General or Number: paid five days early.

Result: -5

Fix. Select the result cells and press Ctrl+Shift+~ (General) or choose Number in Home › Number Format. If negative values should not occur, wrap the formula: =MAX(0, B3-A3) shows 0 days late for early payments.

Cause 4: a number too large to be a date

Excel's calendar ends on 31 December 9999, which is serial number 2,958,465. A larger number in a date-formatted cell, often an order number or an ID typed into a column that was formatted for dates, shows hashes at any width.

B2fx=A2
AB
1Order date
24612345########

B2 is formatted as a date; 4,612,345 lies beyond 9999-12-31.

Result: ########

Fix. Format the cell as General or Number if it is not a date. If it should be a date, the value came in wrongly (for example 20260315 typed without separators); convert it with =DATE(LEFT(A2,4), MID(A2,5,2), RIGHT(A2,2)).

Cause 5: long text in a cell formatted as Text (older versions)

In some Excel versions a cell formatted as Text that contains more than 255 characters, often a long formula pasted into a Text-formatted cell, displays as #####. Change the format to General, then re-enter the content (press F2 and Enter).

Note. The 1904 date system (File › Options › Advanced › Use 1904 date system) can display negative times, but it shifts every date in the workbook by 1,462 days and causes errors when you copy dates between workbooks. Use the MOD technique instead unless you know exactly why you need it.

How to find every ##### on a sheet

  1. There is no Go To Special option for hashes, because they are not values. The quickest cure is to select all (Ctrl+A) and AutoFit all columns (double-click any column boundary).
  2. To find negative times or dates, which AutoFit cannot fix, add a conditional formatting rule such as =C2<0 with a red fill to the date and time columns.
  3. Before printing, check File › Print preview: hashes caused by printer fonts appear there even when the screen looks fine.

When the hashes are a warning

Do not just shrink the font when the hashes come from Cause 2, 3 or 4. A negative time usually means a shift crossed midnight or the start and end were entered the wrong way round; a huge "date" means an ID landed in a date column. Those are data problems, and the hashes are your only visible clue.

Version notes

  • Hashes for values that do not fit behave the same in every version of Excel, on Windows, Mac and the web.
  • Excel for the web and the mobile apps may AutoFit columns differently from the desktop app, so a file that looked fine on one device can show ##### on another.
  • Google Sheets shows long numbers differently (it widens or uses scientific notation), so hashes are an Excel-specific symptom.

More excel errors