Remember Me?

#1
August 13th 12, 03:37 PM
 Junior Member First recorded activity by ExcelBanter: Aug 2012 Posts: 5
Trying to work out a formula for time lost/gained

Hello, I'm not a complete novice when it comes to excel but I dont have much experience with anything other than simple formulas...

This is a bit tricky to explain but i'll try my best...

I'm trying to devise a table to highlight time lost or gained in a single day.

1. In the first column I want the amount of time worked (in hours and minutes)
2. In the second, if the time worked exceeds 7hrs 24mins then I would like the aditional time to show (e.g if worked 8hrs 34mins I would like 1hr 10mins to show, preferably as 1:10)
3. In the third, if the time worked is less than 7hrs 24mins. I would like the time lost to show

Any help is appreciated as all i've managed to do it get it to show the time worked or 0 in the 2nd and 3rd colums.

TIA

#2
August 13th 12, 04:42 PM
 Senior Member First recorded activity by ExcelBanter: Mar 2012 Posts: 663

Quote:
 Originally Posted by Laurr456 Hello, I'm not a complete novice when it comes to excel but I dont have much experience with anything other than simple formulas... This is a bit tricky to explain but i'll try my best... I'm trying to devise a table to highlight time lost or gained in a single day. 1. In the first column I want the amount of time worked (in hours and minutes) 2. In the second, if the time worked exceeds 7hrs 24mins then I would like the aditional time to show (e.g if worked 8hrs 34mins I would like 1hr 10mins to show, preferably as 1:10) 3. In the third, if the time worked is less than 7hrs 24mins. I would like the time lost to show Any help is appreciated as all i've managed to do it get it to show the time worked or 0 in the 2nd and 3rd colums. TIA
Hi,

Have a look at the attached. Is this what you mean?

I've added 7:24 to a cell and referenced this in the formulas. That way if you ever find yourself with a different trigger time (i.e. you start working longer or shorter shifts) you only have to change the time in that one cell rather than all the formulas.

Let me know if any of it needs explaining further.

S.
Attached Files
 Laurr456 Example.zip (8.2 KB, 47 views)
#3
August 13th 12, 08:56 PM posted to microsoft.public.excel.newusers
 external usenet poster First recorded activity by ExcelBanter: Apr 2011 Posts: 3,832
Trying to work out a formula for time lost/gained

Hi,

Am Mon, 13 Aug 2012 14:37:14 +0000 schrieb Laurr456:

1. In the first column I want the amount of time worked (in hours and
minutes)
2. In the second, if the time worked exceeds 7hrs 24mins then I would
like the aditional time to show (e.g if worked 8hrs 34mins I would like
1hr 10mins to show, preferably as 1:10)
3. In the third, if the time worked is less than 7hrs 24mins. I would
like the time lost to show

in B2:
=IF(A2<TIME(7,24,),TIME(7,24,)-A2,"")
in C2:
=IF(A2<TIME(7,24,),TIME(7,24,)-A2,"")

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
#4
August 13th 12, 09:00 PM posted to microsoft.public.excel.newusers
 external usenet poster First recorded activity by ExcelBanter: Apr 2011 Posts: 3,832
Trying to work out a formula for time lost/gained

Hi,

Am Mon, 13 Aug 2012 21:56:11 +0200 schrieb Claus Busch:

in B2:
=IF(A2<TIME(7,24,),TIME(7,24,)-A2,"")
in C2:
=IF(A2<TIME(7,24,),TIME(7,24,)-A2,"")

sorry, I copied one formuala twice
in B2:
=IF(A2TIME(7,24,),A2-TIME(7,24,),"")
in C2:
=IF(A2<TIME(7,24,),TIME(7,24,)-A2,"")

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
#5
August 14th 12, 10:26 AM
 Junior Member First recorded activity by ExcelBanter: Aug 2012 Posts: 5

Wow, thank you both so much - problem solved!!

#6
August 14th 12, 10:39 AM
 Junior Member First recorded activity by ExcelBanter: Aug 2012 Posts: 5

Ok...now i've done that, I have another query.

I've had to add a 4th column (F) which is a running balance. The starting balance is a minus figure (-12).

Which formula can I use which will alter the balance per day, depending on whether there is a credit in the 2nd column (D) or a debit in the 3rd (E)

Hope this makes sense.

Thanks again
#7
August 14th 12, 04:20 PM
 Senior Member First recorded activity by ExcelBanter: Mar 2012 Posts: 663

Quote:
 Originally Posted by Laurr456 Ok...now i've done that, I have another query. I've had to add a 4th column (F) which is a running balance. The starting balance is a minus figure (-12). Which formula can I use which will alter the balance per day, depending on whether there is a credit in the 2nd column (D) or a debit in the 3rd (E) Hope this makes sense. Thanks again
Could you post an example of your sheet so far?
#8
August 14th 12, 10:18 PM
 Junior Member First recorded activity by ExcelBanter: Aug 2012 Posts: 5

Quote:
 Originally Posted by Spencer101 Could you post an example of your sheet so far?
Here's a copy of my sheet so far

Thanks
Attached Files
 FlexiPLAN.xls [Protective Marking PROTECT - Private Information].zip (21.1 KB, 108 views)
#9
August 15th 12, 03:21 PM
 Member First recorded activity by ExcelBanter: Jul 2012 Location: Birmingham Posts: 35

Quote:
 Originally Posted by Laurr456 Hello, I'm not a complete novice when it comes to excel but I dont have much experience with anything other than simple formulas... This is a bit tricky to explain but i'll try my best... I'm trying to devise a table to highlight time lost or gained in a single day. 1. In the first column I want the amount of time worked (in hours and minutes) 2. In the second, if the time worked exceeds 7hrs 24mins then I would like the aditional time to show (e.g if worked 8hrs 34mins I would like 1hr 10mins to show, preferably as 1:10) 3. In the third, if the time worked is less than 7hrs 24mins. I would like the time lost to show Any help is appreciated as all i've managed to do it get it to show the time worked or 0 in the 2nd and 3rd colums. TIA
___A_______B_________C_______
1__08:00___=A1-\$C\$1__07:26
2__07:00___

If you've got it laid out like that ^^^ then...

1. In Cell A1 will be the time worked
2. In an empty cell that you won't use, i.e C1 type in the standard time 07:26
3. Then in B1 put... =A1-\$C\$1

B1 should now say 00:34

To show where the time worked is under 07:26, then you will need to change the date system in Excel options.

Which version of Excel are you using?

The benefit to that though is that whether time worked in A1 is over OR under 07:26 it will show as either - or +
#10
August 16th 12, 12:24 PM
 Junior Member First recorded activity by ExcelBanter: Aug 2012 Posts: 5

I'm using Office 2003.

Thanks for the reply - I have managed to get the credit/debit part of my sheet working, now i'm just bamboozled by the running balance part..as it starts with a minus figure.

I need to know how to make it so when I have a credit the balance goes down and a debit makes the balance go up..?

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post idiot Excel Discussion (Misc queries) 2 October 31st 06 08:27 PM [email protected] Excel Worksheet Functions 1 December 20th 05 11:35 AM Alex Vinokur New Users to Excel 3 September 20th 05 06:58 PM Roze Excel Worksheet Functions 2 November 25th 04 03:41 PM ImraneA Excel Programming 0 January 29th 04 05:35 PM

All times are GMT +1. The time now is 03:56 AM.