how to get the difference of Hours for 2 cells which has value more 10000

Shivanshu Sagar 0 Reputation points
2026-08-13T16:56:51.8833333+00:00

i want to get the difference value for below 2 cells

User's image

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. BabybooHN 3,465 Reputation points Independent Advisor
    2026-08-13T17:21:58.9833333+00:00

    Dear @Shivanshu Sagar

    I understand you are getting a #VALUE! error when attempting to calculate the difference between two time values exceeding 10,000 hours in Excel.

    Excel has a built-in limitation where typing a time value with 10,000 or more hours (like 15609:33 or 11234:18) causes Excel to treat the entry as text instead of a valid time serial number. Subtracting text values directly results in a #VALUE! error.
    Assuming your larger value 15609:33 is in cell A1 and 11234:18 is in cell B1, you can use the following formula to parse the text into decimal hours, calculate the difference, and format it properly:
    Option A: Result in Hours (Decimal Format)

    To get the difference as a simple number of hours (e.g., 4375.25 hours):

    =(LEFT(A1; FIND(":"; A1) - 1) + RIGHT(A1; 2)/60) - (LEFT(B1; FIND(":"; B1) - 1) + RIGHT(B1; 2)/60)
    

    Note: If your Regional Settings require a comma to separate function arguments, please adjust the formula to suit your system; for example, my machine requires a semicolon.

    User's image Option B: Result in [h]:mm Time Format

    As the forum's AI recommended, to return the difference in time format (4375:15):

    =((LEFT(A1; FIND(":"; A1) - 1) + RIGHT(A1; 2)/60) - (LEFT(B1; FIND(":"; B1) - 1) + RIGHT(B1; 2)/60)) / 24
    

    Note: After entering this formula, press Ctrl + 1, select Custom, and set the cell format to [h]:mm.

    How the Formula Works

    • LEFT(A1, FIND(":", A1) - 1) extracts the hours portion (e.g., 15609).
    • RIGHT(A1, 2) / 60 converts the minutes portion to a fraction of an hour (e.g., 33 / 60 = 0.55).
    • Dividing the total difference by 24 converts the total hours into Excel's native time unit (days), which allows custom time formatting like [h]:mm.

    Please let me know if you run into any issues or need further help adjusting this for your specific layout.


    If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in the forum document to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    1 person found this answer helpful.

  2. AI answer

    2026-08-13T16:57:08.2433333+00:00

    If the cells contain elapsed hours like 15609:33 and 11234:18, use a direct subtraction formula:

    =A1-B1
    

    If the result can cross midnight or become negative, use:

    =MOD(A1-B1,1)
    

    Then format the result cell so Excel can display hours greater than 24:

    1. Select the result cell.
    2. Go to Home > Format > Format Cells.
    3. On the Number tab, choose Custom.
    4. In Type, enter:
    [h]:mm;@
    

    That format is required because standard time formatting rolls over after 24 hours.

    If the source cells are stored as text instead of real time values, subtraction can return #VALUE!. In that case, the values must first be converted to real time values before subtracting.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.