Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
One way:
= D1/(C1/TIME(1,0,0)) or, equivalently: = D1/(24*C1) In article , Nascent wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
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 JE McGimpsey wrote in : One way: = D1/(C1/TIME(1,0,0)) or, equivalently: = D1/(24*C1) In article , Nascent wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
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 , Nascent wrote: 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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
It works fine.
You need to format the cells with the formula as a number or currency, Excel still thinks your looking for times. Nascent wrote: 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 JE McGimpsey wrote in : One way: = D1/(C1/TIME(1,0,0)) or, equivalently: = D1/(24*C1) In article , Nascent wrote: 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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
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 JE McGimpsey wrote in : 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 , Nascent wrote: 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. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date-to-number in Excel
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 In article , Nascent wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
convert number to date in excel 2003 | Excel Discussion (Misc queries) | |||
Excel Formula to calulate number of days passed from date to date | Excel Discussion (Misc queries) | |||
excel changes a number to a date and i don't want it to | Excel Discussion (Misc queries) | |||
Excel: I enter date and format for date, but shows as number | Excel Discussion (Misc queries) | |||
how to get the number of days between two date formatted fields in vba for excel? | Excel Worksheet Functions |