Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default Condition on Time

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Condition on Time

in C3 put:

=(B3-C3)*24 to convert time to decimal hours e.g. 7:30 ==7.5 and format
cell as general

in D3

=If(C34,C3-0.5,C3)

HTH


"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default Condition on Time

Thanks HTH,
It works, but I still need to see the result as hours: hh:mm, at the moment
I end up with only a digit, with lots of decimals, can the result in D3 be
converted back into time? I have tried to format the cell to Time, but it
does not work.
Thanks for your help.

Chris.

"Toppers" wrote:

in C3 put:

=(B3-C3)*24 to convert time to decimal hours e.g. 7:30 ==7.5 and format
cell as general

in D3

=If(C34,C3-0.5,C3)

HTH


"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Condition on Time

=IF(C34,(C3-0.5)/24,C3/24)

format as hh:mm

"Chris" wrote:

Thanks HTH,
It works, but I still need to see the result as hours: hh:mm, at the moment
I end up with only a digit, with lots of decimals, can the result in D3 be
converted back into time? I have tried to format the cell to Time, but it
does not work.
Thanks for your help.

Chris.

"Toppers" wrote:

in C3 put:

=(B3-C3)*24 to convert time to decimal hours e.g. 7:30 ==7.5 and format
cell as general

in D3

=If(C34,C3-0.5,C3)

HTH


"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default Condition on Time

Hi HTH,
It worked, fantastic, Thank you!
Chris

"Toppers" wrote:

=IF(C34,(C3-0.5)/24,C3/24)

format as hh:mm

"Chris" wrote:

Thanks HTH,
It works, but I still need to see the result as hours: hh:mm, at the moment
I end up with only a digit, with lots of decimals, can the result in D3 be
converted back into time? I have tried to format the cell to Time, but it
does not work.
Thanks for your help.

Chris.

"Toppers" wrote:

in C3 put:

=(B3-C3)*24 to convert time to decimal hours e.g. 7:30 ==7.5 and format
cell as general

in D3

=If(C34,C3-0.5,C3)

HTH


"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Condition on Time

=IF(C3TIME(4,0,0),C3-TIME(0,30,0),C3)
or
=IF(C31/6,C3-1/48,C3)
--
David Biddulph

"Chris" wrote in message
...
I calculate the number of hours daily worked. I have column A: timeIn,
Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this:
If
the number of hours in column C is greater than 4:00 hours, then 30
minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Condition on Time

See David's reply too: might (is!) better.
"Chris" wrote:

Hi HTH,
It worked, fantastic, Thank you!
Chris

"Toppers" wrote:

=IF(C34,(C3-0.5)/24,C3/24)

format as hh:mm

"Chris" wrote:

Thanks HTH,
It works, but I still need to see the result as hours: hh:mm, at the moment
I end up with only a digit, with lots of decimals, can the result in D3 be
converted back into time? I have tried to format the cell to Time, but it
does not work.
Thanks for your help.

Chris.

"Toppers" wrote:

in C3 put:

=(B3-C3)*24 to convert time to decimal hours e.g. 7:30 ==7.5 and format
cell as general

in D3

=If(C34,C3-0.5,C3)

HTH


"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Condition on Time

Another way....

=IF(C3--"4:00",C3-"0:30",C3)


"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default Condition on Time

Thank you all, it is now working very nicely, It is great!
Chris.

"Chris" wrote:

I calculate the number of hours daily worked. I have column A: timeIn, Column
B: TimeOut, Column C calculates the total hours done, which is fine. I am
trying to enter a formula in column D which will say something like this: If
the number of hours in column C is greater than 4:00 hours, then 30 minutes
have to be substracted to it.
How can I do this?
I have tried : IF(C3Time(4,0,1), "-0:30"), to no avail.
Any help appreciated.

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
Any Nested Function & Condition For Calculating Date & Time Safu Excel Worksheet Functions 3 February 10th 07 03:28 PM
How to set the time as condition within if statement? Eric Excel Worksheet Functions 2 November 10th 06 01:57 AM
Lookup function with condition in time series data Tomas Excel Worksheet Functions 0 June 21st 06 06:33 PM
Calculating Time difference based on a condition sonnethg Excel Discussion (Misc queries) 4 October 11th 05 09:25 PM
How to get date entered recording first time condition is true? Dan Morton Excel Discussion (Misc queries) 5 September 8th 05 12:19 AM


All times are GMT +1. The time now is 12:05 PM.

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"