Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to convert time to integer hours or minutes in Excel?

Author Sun Last modified

In Excel, users commonly work with time values for scheduling, tracking durations, or calculating total work hours. By default, when you use a formula such as =cell *24 to convert time to hours, or =cell *1440 for minutes, Excel returns decimal values which represent exact fractions of hours or minutes. However, in many practical scenarios, such as payroll calculations, reporting, or resource allocation, you may need to convert these time values to integer hours or minutes (for example, rounding down 5.6 hours to 5 hours or converting 16.7 minutes to17 minutes). This guide explains several methods to achieve integer conversion and discusses their applications and considerations, so you can choose the best approach for your specific needs.
 convert time to integer hours

Convert time to integer hours or minutes with formula

Convert time to integer hours or minutes with Kutools for Excel

Use VBA macro to convert time to integer hours or minutes

Round hours or minutes with Excel rounding formulas


Convert time to integer hours or minutes with formula

If you want a quick solution using Excel formulas, you can convert time values to integer hours or minutes with the help of the INT function. This approach is useful when decimal values are not desired, for instance, when tracking whole working hours per shift or rounding to the last completed minute.

To use this formula, select the cell where you want to display the result, then enter one of the following formulas depending on your requirement:

  • Convert to integer hours: =INT(A2*24)
  • Convert to integer minutes: =INT(A2*1440)

After entering the formula, press Enter to display the result. If you have a list of times to convert, drag the fill handle down to apply the formula to the other cells.
apply formulas to convert time to integer hours or minutes

Note: The INT function always rounds down, so keep in mind that values like 6.9 hours will be shown as 6. If you need a different rounding method (up or nearest), see the next solutions below.


Convert time to integer hours or minutes with Kutools for Excel

If you have Kutools for Excel installed, converting time to integer hours or minutes becomes even faster and more flexible. Kutools offers the Convert Time utility to transform time into decimal numbers first, then allows you to round up, down, or to the nearest integer using its Round feature. This method is practical for batch conversions and is especially useful when dealing with large datasets where manual formula entry would be tedious.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the range of time values you want to convert. Then, go to Kutools > Content > Convert Time > Time to Hours or Time to Minutes depending on your needs.
click Convert Time > Time to Hours/Time to Minutes feature of kutools

2. When the conversion is complete, a dialog will pop up indicating how many cells have been converted; click OK to close it. Keep the converted cells selected and click Kutools > Round.

A dialog pops out to remind the number of converted cells arrow right converted result

3. In the Round without Formula dialog, type 0 in the Decimal place textbox to set rounding to the nearest integer. Select your preferred rounding option from the Option section: Round off (to nearest whole number), Round up, or Round down.
specify options in the Round dialog box

4. Click Ok to apply the rounding and all selected values will be converted to integer hours or minutes.
all selected decimal time are rounded to integers.

Kutools is recommended if you need to do repetitive conversions and rounding operations over many sheets, as its menu-based interface reduces formula errors.


Use VBA macro to convert time to integer hours or minutes

This solution is suitable for users who want to automate the conversion of time values to integer hours or minutes in large datasets, or apply conversions to multiple ranges without manually entering formulas. The VBA macro allows you to choose between rounding down, up, or to the nearest integer, and can be customized according to your requirements.

1. Click Developer Tools > Visual Basic. In the Microsoft Visual Basic for Applications window that appears, click Insert > Module, then paste the code below into the module:

Sub ConvertTimeToInteger_OutputElsewhere()
    Dim rng As Range
    Dim cell As Range
    Dim resType As String
    Dim roundMethod As String
    Dim outRng As Range
    Dim xTitleId As String
    Dim val As Double, res As Double
    xTitleId = "KutoolsforExcel"
    On Error Resume Next
    Set rng = Application.Selection
    Set rng = Application.InputBox("Select range to convert:", xTitleId, rng.Address, Type:=8)
    If rng Is Nothing Then Exit Sub
    On Error GoTo 0
    On Error Resume Next
    Set outRng = Application.InputBox("Select a cell for output:", xTitleId, Type:=8)
    If outRng Is Nothing Then Exit Sub
    On Error GoTo 0
    resType = Application.InputBox("Choose type (Hour/Minute):", xTitleId, "Hour", Type:=2)
    roundMethod = Application.InputBox("Rounding method (Down/Up/Nearest):", xTitleId, "Down", Type:=2)
    For Each cell In rng
        If IsNumeric(cell.Value) Then
            If UCase(resType) = "HOUR" Then
                val = cell.Value * 24
            Else
                val = cell.Value * 1440
            End If
            Select Case UCase(roundMethod)
                Case "UP"
                    res = WorksheetFunction.RoundUp(val, 0)
                Case "NEAREST"
                    res = WorksheetFunction.Round(val, 0)
                Case Else
                    res = WorksheetFunction.RoundDown(val, 0)
            End Select
            outRng.Offset(cell.Row - rng.Row, cell.Column - rng.Column).Value = res
        End If
    Next cell
    
    MsgBox "Conversion completed! Results placed starting at " & outRng.Address, vbInformation
End Sub
  

2. To run the code, click the Run button button in the VBA window. A dialog will prompt you to select your target range and output cells, choose "Hour" or "Minute" conversion, and select your desired rounding method. The macro will then automatically convert all specified time cells into integers according to your choices.


Round hours or minutes with Excel rounding formulas

When you need to control how the rounding works (whether rounding up, down, or to the nearest integer), Excel provides several built-in rounding functions. This solution suits cases where you want precision and flexibility, for example, always rounding partial hours up for payroll, or rounding to the nearest minute for time logs.

1. Enter one of the following formulas into the cell where you want the result (for example, B2):

  • Round to the nearest integer hour:
    =ROUND(A2*24,0)
  • Round down to integer hour:
    =ROUNDDOWN(A2*24,0)
  • Round up to integer hour:
    =ROUNDUP(A2*24,0)
  • Round to the nearest integer minute:
    =ROUND(A2*1440,0)
  • Round down to integer minute:
    =ROUNDDOWN(A2*1440,0)
  • Round up to integer minute:
    =ROUNDUP(A2*1440,0)

2. Press Enter to confirm the formula. To convert a column of time values, copy the formula down by dragging the fill handle from the cell where you entered the formula. Make sure to adjust cell references as needed for your data range.

The functions ROUND, ROUNDUP, and ROUNDDOWN behave differently: use ROUND to get the closest integer, ROUNDUP if you want to ensure any fractional value is rounded upward, and ROUNDDOWN if you want to always lower the value. Choose the one that fits your scenario best.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in