How to use TIMEVALUE function in Excel?

The `TIMEVALUE` function in Excel is used to convert a text representation of a time into a decimal number that Excel recognizes as a time. This is particularly useful when time is stored as text in a worksheet, and you need to perform time calculations.

Here’s how to use the `TIMEVALUE` function:

Syntax

=TIMEVALUE(time_text)
  • time_text: This is a required argument that represents the time as a text string. It should be in a recognizable time format, such as `HH:MM` or `HH:MM AM/PM`.

Steps to Use `TIMEVALUE`

   =TIMEVALUE("2:30 PM")
  • Enter the Function: Click on the cell where you want the result to appear.
  • Input the Formula: Type `=TIMEVALUE(` and then add your text time in quotes. For example, type:
  • Press Enter: After you input the text time, close the parentheses and hit Enter.
  • Result: The function will return a decimal number representing the time. For instance, `2:30 PM` would be approximately `0.604166667` because 2:30 PM is 14.5 out of 24 hours (14.5/24 = 0.604166667).

Important Points

  • Format the Result: Typically, the decimal number will be formatted in such a way that shows the time correctly. You may need to format the cell to display this as time rather than a decimal or fraction.
  • Time Formats: The text time format should be recognizable by Excel as a valid time. If the format is unconventional, Excel might return an error.
  • AM/PM Specification: When not including AM/PM in the input string, Excel assumes the 24-hour format. So, “14:30” is read as 2:30 PM, whereas “2:30” would be interpreted as 2:30 AM unless specified otherwise.

Example Use Case

If cell `A1` contains a text string “8:45:23 AM”, you could use the following formula in another cell to convert it to a time serial number:

=TIMEVALUE(A1)

After executing this formula, the cell will display the decimal number `0.364247685`, which represents 8:45:23 AM in Excel’s time system.

By following these instructions, you can effectively use the `TIMEVALUE` function to handle time-based data in Excel.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project