ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I enter a cell value into the Timevalue() function? (https://www.excelbanter.com/excel-worksheet-functions/113334-how-do-i-enter-cell-value-into-timevalue-function.html)

busterpace

How do I enter a cell value into the Timevalue() function?
 
I have to enter a time into cell (b1) and subtract that time from cell (c1).
I can do that and get an answer. I get an answer in cell (d1). I have all
the cells formatted in the hh:mm mode and everything works fine.

I need to be able to determine if the time in cell (c1) is greater than
(meaning later than) 7pm so I can charge a different rate. I can't seem to
get the timevalue(c1) to give me anything other than an #value error. I
can't enter a " ' " before this value because it has to be computed.

I would also like to enter a datevalue() function without having to enter
the " ' ".


Biff

How do I enter a cell value into the Timevalue() function?
 
Hi!

You don't need to use Timevalue. The argument for Timevalue has to be a TEXT
representation of a time. From your description C1 is not a TEXT
representation but is a true Excel time which is actually a NUMBER so you
get the error.

To test C1 you can use something like this inside an IF function:

=IF(C119/24,this_rate,that_rate)

Or:

=IF(C1TIME(19,0,0),this_rate,that_rate)

I would also like to enter a datevalue() function without having to enter
the " ' ".


Need more info on that one.

Biff

"busterpace" wrote in message
...
I have to enter a time into cell (b1) and subtract that time from cell
(c1).
I can do that and get an answer. I get an answer in cell (d1). I have
all
the cells formatted in the hh:mm mode and everything works fine.

I need to be able to determine if the time in cell (c1) is greater than
(meaning later than) 7pm so I can charge a different rate. I can't seem
to
get the timevalue(c1) to give me anything other than an #value error. I
can't enter a " ' " before this value because it has to be computed.

I would also like to enter a datevalue() function without having to enter
the " ' ".





All times are GMT +1. The time now is 07:39 AM.

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