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

B

busterpace

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 " ' ".
 
B

Biff

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(C1>19/24,this_rate,that_rate)

Or:

=IF(C1>TIME(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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top