Date-to-number in Excel

N

Nascent

Hi all,

I have a cell that is a "start time" and a cell that is an "end time" and a
cell that is just the difference between the two. I have a fourth cell
that contains an arbitrary number. Say, 22. ie:

a b c d
13:00 13:40 0:40 22

The goal is to figure out what my rate per hour is. So I need to divide
sixty minutes by the time span to arrive at 1.5, then multiply that by d
(22) to get 33. So if I spent forty minutes doing something and I made 22
units, in an hour I would make 33. Simple, right?

I CAN'T FIGURE OUT HOW TO DO IT IN EXCEL!

I've tried changing the types, everything I can think of.

Help?

Thanks,
Jason
 
N

Nascent

Thanks for the reply but it doesn't work. I've even made sure there was
no formatting that was munging up what I was seeing. I tried both
methods, too.

Regards,
Jason
 
J

JE McGimpsey

Both methods work for me. What does "doesn't work" mean to you? Do you
get the wrong value? An error? a crash?

Did you format the cell as General or another number format?

Are your times In article <[email protected]>,
 
J

JWolf

It works fine.
You need to format the cells with the formula as a number or currency,
Excel still thinks your looking for times.
 
N

Nascent

Actually, at this point I can get the longer method to work but not the
shorter. When I say "doesn't work" I mean the resulting box shows
"0:00". I did this by opening a new spreadsheet, entering the values as
such:

a b c d e
1 13:00 13:40 =B1-A1 22 =D1/(24*C1)

That does not work. I wind up with 0:00 in e1. But when I use the
longer version you sent (= D1/(C1/TIME(1,0,0))), it works just fine. I
just need to figure out why it's not working in my original sheet, so
you've still given me a solution.

Thanks!,
Jason
 
J

JE McGimpsey

IF you wind up with 0:00 in E1, it's because you didn't format the cell
as General or another number format after entering the formula
 
Top