ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Converting Time to a Number (https://www.excelbanter.com/excel-discussion-misc-queries/197418-converting-time-number.html)

connie

Converting Time to a Number
 
Hello,
I used the following formula to convert time to a number:

=CONVERT(P14*24,"hr","mn")

This works perfectly for some time, then I will open the spreadsheet and
will receive a "Data Loss" error. When I open the spreadsheet, the cell will
then have the following: =#N/A

Any help is appreciated.

Connie

T. Valko

Converting Time to a Number
 
Not sure why you're getting that error. My best guess is it has something to
do with the Analysis ToolPak add-in which is required for the CONVERT
function.

You really don't need to use the CONVERT function. This will do the same
thing:

=P14*1440

Format as General or Number

--
Biff
Microsoft Excel MVP


"Connie" wrote in message
...
Hello,
I used the following formula to convert time to a number:

=CONVERT(P14*24,"hr","mn")

This works perfectly for some time, then I will open the spreadsheet and
will receive a "Data Loss" error. When I open the spreadsheet, the cell
will
then have the following: =#N/A

Any help is appreciated.

Connie




connie

Converting Time to a Number
 
Hi T.

Thank you for your response. As you say, didn't need to use CONVERT.
Instead, I used (D14-INT(D14))*24*3600/60. This works perfectly. P14*1440
changes the cell format to Time, even though I make it General or Number.

Connie


"T. Valko" wrote:

Not sure why you're getting that error. My best guess is it has something to
do with the Analysis ToolPak add-in which is required for the CONVERT
function.

You really don't need to use the CONVERT function. This will do the same
thing:

=P14*1440

Format as General or Number

--
Biff
Microsoft Excel MVP


"Connie" wrote in message
...
Hello,
I used the following formula to convert time to a number:

=CONVERT(P14*24,"hr","mn")

This works perfectly for some time, then I will open the spreadsheet and
will receive a "Data Loss" error. When I open the spreadsheet, the cell
will
then have the following: =#N/A

Any help is appreciated.

Connie





T. Valko

Converting Time to a Number
 
P14*1440 changes the cell format to Time,
even though I make it General or Number.


That's just Excel being "helpful".

After Excel is done being "helpful" just change the format to General or
Number.


--
Biff
Microsoft Excel MVP


"Connie" wrote in message
...
Hi T.

Thank you for your response. As you say, didn't need to use CONVERT.
Instead, I used (D14-INT(D14))*24*3600/60. This works perfectly.
P14*1440
changes the cell format to Time, even though I make it General or Number.

Connie


"T. Valko" wrote:

Not sure why you're getting that error. My best guess is it has something
to
do with the Analysis ToolPak add-in which is required for the CONVERT
function.

You really don't need to use the CONVERT function. This will do the same
thing:

=P14*1440

Format as General or Number

--
Biff
Microsoft Excel MVP


"Connie" wrote in message
...
Hello,
I used the following formula to convert time to a number:

=CONVERT(P14*24,"hr","mn")

This works perfectly for some time, then I will open the spreadsheet
and
will receive a "Data Loss" error. When I open the spreadsheet, the
cell
will
then have the following: =#N/A

Any help is appreciated.

Connie








All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com