Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Cost Based Time Duration 2

Status
Not open for further replies.

Adnane

Technical User
Apr 22, 2003
88
EU
Hello,

i would like to know if there is a function in Excel that will allow me to calculate a cost based a $/min and a duration

Actually, my data looks like this

Duration(min:sec) Minute Cost Total Cost
----------------- ----------- ----------
90:15 2 180.5

i have managed to calculate using right() and left() functions but it would be really nicer to have a function that will understand that it is a duration and will calculate based on this

Thanks a lot for your help



Adnane

Micorosft North Africa
 
Assuming your data is in real Time format, then just

With TimeCell being the cell that contains your 90:15, and MinuteCostCell being the cell that contains your hourly rate, then

=TimeCell*24*MinuteCostCell

Regards
Ken..........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Adnane,

Realize that Real Time UNITS are in DAYS. Date & Time are just NUMBERS, like just now in Texas it's 38420.32106 which is 3/9/2005 7:42 AM (and can be simply FORMATTED to display a number of different date & time variations like Wed, March 9, 05 07:42)

If you take the FRACTION part, .32106 and multiply by 24 HOURS PER DAY, the CONVERSION for DAYS to HOURS, you get 7.705555555 HOURS.




Skip,
[sub]
[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue][/sub]
 
Oops - Missed the minute part :-(

=TimeCell*24*60*MinuteCostCell

if you want to multiply by a cost per minute.

My apologies, and cheers to Skip who's note prompted me to realise my mistake :)

Regards
Ken..........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
First, thanks a lot for your answers
i am sorry if i misunderstood you or if it will sound stupid but you are talking about the time cell as ordinary Time Formatted cell. however, if i format it like this, it will not allow me to have a time period of 90 minutes for example
so what i have done is formatted the cell as ordinary text in order to have somthing that looks like 90:15
in fact, i do not have hours in my sheet.
i don't have starting & ending times neither.
i hope that this will clarify the problem.

Regards



Adnane

Micorosft North Africa
 


If you used REAL TIME, then all you'ld have to do to DISPLAY 90:15 (minutes and seconds) is to do a CUSTOM FORMAT
[tt]
[m]:ss
[/tt]


Skip,
[sub]
[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue][/sub]
 


You REALLY need to use real time values an not strings!

Skip,
[sub]
[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top