Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Calculations on Times Formatted as Text

I would like to calculate the expense associated with the time usage of
something, given a rate per hour, and times formatted as Text such as below:

1535 1700

1535 represents 3:35 pm, and 1700 represents 5:00 pm. I can calculate the
difference between the two, and get 3:25 for example, but not sure how to
express/format this to get the desired 3 & 25/60 hours times "x" rate.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Calculations on Times Formatted as Text

Apologies for the bad math - difference is of course 1:25, not 3:25

"benneyb" wrote:

I would like to calculate the expense associated with the time usage of
something, given a rate per hour, and times formatted as Text such as below:

1535 1700

1535 represents 3:35 pm, and 1700 represents 5:00 pm. I can calculate the
difference between the two, and get 1:25 for example, but not sure how to
express/format this to get the desired 1 & 25/60 hours times "x" rate.

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Calculations on Times Formatted as Text

You could keep these as actual times (H:MM) but use a number format like
HHMM to give you the military time appearance. Do the subtraction, which is
stored internally as H:MM and displayed using the same HHMM number format.
Convert this result to whole number hours plus fraction of minutes by
dividing by one hour, or multiplying by 24. Then multiply by the hourly
rate.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______



"benneyb" wrote in message
...
I would like to calculate the expense associated with the time usage of
something, given a rate per hour, and times formatted as Text such as
below:

1535 1700

1535 represents 3:35 pm, and 1700 represents 5:00 pm. I can calculate the
difference between the two, and get 3:25 for example, but not sure how to
express/format this to get the desired 3 & 25/60 hours times "x" rate.

Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Calculations on Times Formatted as Text

try:

=TIME(LEFT(B1,2),RIGHT(B1,2),0)-TIME(LEFT(A1,2),RIGHT(A1,2),0)
--
Gary''s Student - gsnu200802


"benneyb" wrote:

Apologies for the bad math - difference is of course 1:25, not 3:25

"benneyb" wrote:

I would like to calculate the expense associated with the time usage of
something, given a rate per hour, and times formatted as Text such as below:

1535 1700

1535 represents 3:35 pm, and 1700 represents 5:00 pm. I can calculate the
difference between the two, and get 1:25 for example, but not sure how to
express/format this to get the desired 1 & 25/60 hours times "x" rate.

Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Calculations on Times Formatted as Text

I can calculate the difference between the two, and get 3:25

What formula do you use to get that result?

You might be able to wrap that inside the TIMEVALUE function:

=TIMEVALUE(your_formula)*24*rate

--
Biff
Microsoft Excel MVP


"benneyb" wrote in message
...
I would like to calculate the expense associated with the time usage of
something, given a rate per hour, and times formatted as Text such as
below:

1535 1700

1535 represents 3:35 pm, and 1700 represents 5:00 pm. I can calculate the
difference between the two, and get 3:25 for example, but not sure how to
express/format this to get the desired 3 & 25/60 hours times "x" rate.

Thanks in advance.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Calculations on Times Formatted as Text

Thanks All,

I got it with a combinaton of Gary's Formula and Jon's calculation of
multiplying by 24 - this gave me the number of hours. Many thanks for the
very prompt replies!

"Jon Peltier" wrote:

You could keep these as actual times (H:MM) but use a number format like
HHMM to give you the military time appearance. Do the subtraction, which is
stored internally as H:MM and displayed using the same HHMM number format.
Convert this result to whole number hours plus fraction of minutes by
dividing by one hour, or multiplying by 24. Then multiply by the hourly
rate.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______



"benneyb" wrote in message
...
I would like to calculate the expense associated with the time usage of
something, given a rate per hour, and times formatted as Text such as
below:

1535 1700

1535 represents 3:35 pm, and 1700 represents 5:00 pm. I can calculate the
difference between the two, and get 3:25 for example, but not sure how to
express/format this to get the desired 3 & 25/60 hours times "x" rate.

Thanks in advance.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count text appear how many times & put in respec col??eg 1st times Piglet Excel Discussion (Misc queries) 3 May 29th 08 07:53 AM
Calculations using Times in Excel 2003 Darryl_Neeley Excel Worksheet Functions 6 September 26th 07 07:51 PM
times and Calculations professor_ed New Users to Excel 5 September 25th 07 05:57 PM
Difference in dates calculations except between certain times. Steve Hud Excel Discussion (Misc queries) 1 January 13th 06 01:10 PM
Converting 'General' formatted cells to Text formatted cell using. Zahid Khan Excel Worksheet Functions 1 March 12th 05 07:13 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"