Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

Hi All

I have a question which i am hoping someone will eb able to help me
with, i have a spreadsheet which contains infromation for part time
hours worked during the course of a month for individuals (e.g. below)

Name Start End Hours
Persona 1:30 2:30 1
Persona 3:30 4:30 1
Persona 9:30 11:30
person b
person b
person c
person c
person d etc etc

What i need is a formula that will allo wme to add an extra column
which gives me the total hours person a worked, person be worked and so
on. The original data contains multiple lines (i.e persona could have
10 lines, personb15 lines etc etc), and is used for temporay teachers
that may work different hours and days in a month.

any help is appreciate, and i hope the above makes sense

  #2   Report Post  
Posted to microsoft.public.excel.newusers
Biff
 
Posts: n/a
Default Work out overtime hours for individuals

Hi!

Try this:

Assuming your range is A2:E6. Enter this formula in F2 and copy down as
needed:

=IF(A2=A3,"",SUMIF(A$2:A$6,A2,D$2:D$6))

Biff

"Fudge" wrote in message
ups.com...
Hi All

I have a question which i am hoping someone will eb able to help me
with, i have a spreadsheet which contains infromation for part time
hours worked during the course of a month for individuals (e.g. below)

Name Start End Hours
Persona 1:30 2:30 1
Persona 3:30 4:30 1
Persona 9:30 11:30
person b
person b
person c
person c
person d etc etc

What i need is a formula that will allo wme to add an extra column
which gives me the total hours person a worked, person be worked and so
on. The original data contains multiple lines (i.e persona could have
10 lines, personb15 lines etc etc), and is used for temporay teachers
that may work different hours and days in a month.

any help is appreciate, and i hope the above makes sense



  #3   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Work out overtime hours for individuals

=SUMIF(A1A,"Person a",D:D)

If you need regular and overtime hours, just use

=MAX(40,SUMIF(A1A,"Person a",D:D))

for regular hours, and

=MIN(0,40-SUMIF(A1A,"Person a",D:D))

if regular hours are upto 40.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
ups.com...
Hi All

I have a question which i am hoping someone will eb able to help me
with, i have a spreadsheet which contains infromation for part time
hours worked during the course of a month for individuals (e.g. below)

Name Start End Hours
Persona 1:30 2:30 1
Persona 3:30 4:30 1
Persona 9:30 11:30
person b
person b
person c
person c
person d etc etc

What i need is a formula that will allo wme to add an extra column
which gives me the total hours person a worked, person be worked and so
on. The original data contains multiple lines (i.e persona could have
10 lines, personb15 lines etc etc), and is used for temporay teachers
that may work different hours and days in a month.

any help is appreciate, and i hope the above makes sense



  #4   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

Hi thanks for the info, no i just need a column that gives me the total
hours worked for each individual as 1 line rather than me have to sit
there and calculate the total hours each for each record,

the other problem is will it calculate the hours if they are setup as
follow:

01:30
06:15
and so forth or do i need to convert the numerical fields first..as i
know in the past trying to get a sum doesnt always work.

Bob Phillips wrote:

=SUMIF(A1A,"Person a",D:D)

If you need regular and overtime hours, just use

=MAX(40,SUMIF(A1A,"Person a",D:D))

for regular hours, and

=MIN(0,40-SUMIF(A1A,"Person a",D:D))

if regular hours are upto 40.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
ups.com...
Hi All

I have a question which i am hoping someone will eb able to help me
with, i have a spreadsheet which contains infromation for part time
hours worked during the course of a month for individuals (e.g. below)

Name Start End Hours
Persona 1:30 2:30 1
Persona 3:30 4:30 1
Persona 9:30 11:30
person b
person b
person c
person c
person d etc etc

What i need is a formula that will allo wme to add an extra column
which gives me the total hours person a worked, person be worked and so
on. The original data contains multiple lines (i.e persona could have
10 lines, personb15 lines etc etc), and is used for temporay teachers
that may work different hours and days in a month.

any help is appreciate, and i hope the above makes sense


  #5   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Work out overtime hours for individuals

No, the formula I gave will sum up the hours, but format the cell as [h]:mm
to allow for more than 24 hours.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
oups.com...
Hi thanks for the info, no i just need a column that gives me the total
hours worked for each individual as 1 line rather than me have to sit
there and calculate the total hours each for each record,

the other problem is will it calculate the hours if they are setup as
follow:

01:30
06:15
and so forth or do i need to convert the numerical fields first..as i
know in the past trying to get a sum doesnt always work.

Bob Phillips wrote:

=SUMIF(A1A,"Person a",D:D)

If you need regular and overtime hours, just use

=MAX(40,SUMIF(A1A,"Person a",D:D))

for regular hours, and

=MIN(0,40-SUMIF(A1A,"Person a",D:D))

if regular hours are upto 40.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
ups.com...
Hi All

I have a question which i am hoping someone will eb able to help me
with, i have a spreadsheet which contains infromation for part time
hours worked during the course of a month for individuals (e.g. below)

Name Start End Hours
Persona 1:30 2:30 1
Persona 3:30 4:30 1
Persona 9:30 11:30
person b
person b
person c
person c
person d etc etc

What i need is a formula that will allo wme to add an extra column
which gives me the total hours person a worked, person be worked and

so
on. The original data contains multiple lines (i.e persona could have
10 lines, personb15 lines etc etc), and is used for temporay teachers
that may work different hours and days in a month.

any help is appreciate, and i hope the above makes sense






  #6   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

thanks for that i will try it on the spread sheet tomorrow at work, and
willr evert back in the evening tomorrow if i encounter a problem.

  #7   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Work out overtime hours for individuals

Okay, will watch out for it.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
oups.com...
thanks for that i will try it on the spread sheet tomorrow at work, and
willr evert back in the evening tomorrow if i encounter a problem.



  #8   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

bob can this formula be written into a macro, so that on a monthly
basis when i print the list i can simply apply it to open into a new
work sheet with the figures as i need them? rather than having to write
out the formula every month

  #9   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals


Fudge wrote:
bob can this formula be written into a macro, so that on a monthly
basis when i print the list i can simply apply it to open into a new
work sheet with the figures as i need them? rather than having to write
out the formula every month


Hi the fields that are used are as follow:

Staff`Ref Surname First NAme PT Worklog Start PT Worklog End Pay
Grade Cost Centre Ref Duration Hrly Rate (columns A-I) so column J
would contain the total for total hours worked for each individual
(multiple lines) what bits do i need to change on the formula, the
duration shows as 01:30, 00:30, 06:00

  #10   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

I've attached sample data from the worksheet for you to look at

Staff Reference Surname First Name PT Work Log Start Date PT Work Log
End Date Pay Grade Code Cost Centre Reference Duration Hourly Rate
1000872 Marks Janet 28/03/2006 28/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 21/03/2006 21/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 14/03/2006 14/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 07/03/2006 07/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 28/02/2006 28/02/2006 HP S000 02:00 23.56
1000872 Marks Janet 21/02/2006 21/02/2006 HP S000 02:00 23.56
1000647 Manning Clare 27/03/2006 27/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 20/03/2006 20/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 13/03/2006 13/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 06/03/2006 06/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 27/02/2006 27/02/2006 HP B300 00:30 23.56
1000647 Manning Clare 20/02/2006 20/02/2006 HP B300 00:30 23.56
1000463 Burton Lisa 31/03/2006 31/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 24/03/2006 24/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 17/03/2006 17/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 10/03/2006 10/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 03/03/2006 03/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 24/02/2006 24/02/2006 HP B650 01:30 23.56
1000315 Gunter Norman 06/03/2006 06/03/2006 HP T300 02:00 23.56



  #11   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Work out overtime hours for individuals

Thanks for the example, made it easy.

This is all the code you need.

Sub Test()
Dim cRows As Long

cRows = Cells(Rows.Count, "A").End(xlUp).Row - 1
Range("J2").Formula = "=SUMIF(A:A,A2,H:H)"
Range("J2").AutoFill Range("J2").Resize(cRows)

End Sub

If you add it to Personal.xls and add a button to a toolbar and assign it to
that button, it is always available.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
oups.com...
I've attached sample data from the worksheet for you to look at

Staff Reference Surname First Name PT Work Log Start Date PT Work Log
End Date Pay Grade Code Cost Centre Reference Duration Hourly Rate
1000872 Marks Janet 28/03/2006 28/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 21/03/2006 21/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 14/03/2006 14/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 07/03/2006 07/03/2006 HP S000 02:00 23.56
1000872 Marks Janet 28/02/2006 28/02/2006 HP S000 02:00 23.56
1000872 Marks Janet 21/02/2006 21/02/2006 HP S000 02:00 23.56
1000647 Manning Clare 27/03/2006 27/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 20/03/2006 20/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 13/03/2006 13/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 06/03/2006 06/03/2006 HP B300 00:30 23.56
1000647 Manning Clare 27/02/2006 27/02/2006 HP B300 00:30 23.56
1000647 Manning Clare 20/02/2006 20/02/2006 HP B300 00:30 23.56
1000463 Burton Lisa 31/03/2006 31/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 24/03/2006 24/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 17/03/2006 17/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 10/03/2006 10/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 03/03/2006 03/03/2006 HP B650 01:30 23.56
1000463 Burton Lisa 24/02/2006 24/02/2006 HP B650 01:30 23.56
1000315 Gunter Norman 06/03/2006 06/03/2006 HP T300 02:00 23.56



  #12   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

as you probably can tell i am a total newbie at writing macros, how do
i add the macro to personal.xls and then make it available for everyone
to use, also do i have to write the code in visual basic.

The other thing i tried the formula u provided, it gives me th elines i
want, but then doesn't calculate some lines and leaves them as zero
despite there being hours.

  #13   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Work out overtime hours for individuals

If you want to share it with others, Personal.xls is no good. Why don't you
create a new workbook with the macro and a button, and save it as a template
file. Your users can then open that whenever they start afresh.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Fudge" wrote in message
ups.com...
as you probably can tell i am a total newbie at writing macros, how do
i add the macro to personal.xls and then make it available for everyone
to use, also do i have to write the code in visual basic.

The other thing i tried the formula u provided, it gives me th elines i
want, but then doesn't calculate some lines and leaves them as zero
despite there being hours.



  #14   Report Post  
Posted to microsoft.public.excel.newusers
Fudge
 
Posts: n/a
Default Work out overtime hours for individuals

column a = staff ref
column b = surname
column c = first name
column d = PT worklog start date
column e = PT worklog end date
column f = pay grade
column g = cost centre
column h = duration
column i = hourly rate

That is the setup of the above example, the duration field shows as
01:30 which i have formatted to [H]:mm. however when i drop the formula
in to column j row j2 it doesn't calculate the total hours for some
staff and shows as zero.

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
Conditional formatting on overtime hours Jennifer Excel Worksheet Functions 3 February 23rd 06 08:36 PM
Calculate Hours and overtime by week gregt812 Excel Worksheet Functions 1 November 23rd 05 07:03 PM
Time sheets Driver Excel Worksheet Functions 5 November 7th 05 11:19 AM
How can I work out how many hours I get premium rate? HappyTrucker Excel Worksheet Functions 4 August 7th 05 07:39 AM
Work Hours Time Question Qaspec Excel Worksheet Functions 5 March 27th 05 02:58 PM


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

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

About Us

"It's about Microsoft Excel"