[Solved] Sum time by department and date

Discuss the spreadsheet application
Locked
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

[Solved] Sum time by department and date

Post by Cat101 »

I thought this would be an easy spreadsheet but then factors, such as day & weekends, came into play.

Basically the client has about 60 standard jobs that move from one area to another. The work time within each dept is timed, which is then multiplied by the number of items being sent.

I thought I could sum by matching date & dept. Giving me total work within a dept for a day.

Attached is my spread sheet.
"Daily" Sheet is where they enter in the job number and the count (yellow columns are protected & grey are hidden.)
it is from this sheet that I need to total the time.
"Jobs" Sheet, once set-up, will be completely protected. This is where Daily pulls info from.
"Total" is where the time is accumulated at, This way the dept managers can move staff around when needed.

As I said, I thought this an easy sheet, but now I'm not sure how to match & total :crazy:
Also, they don't work weekends..

Any suggestions are appreciated..
Attachments
BlackBook.ods
(11.22 KiB) Downloaded 305 times
Last edited by MrProgrammer on Mon Mar 30, 2026 9:32 pm, edited 2 times in total.
Reason: Edited topic's subject
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by Cat101 »

Okay, Im continuing to work on this & after reading Mr Programmer's post on SUMPRODUCT..
I've made my first attempt at summing time.
I inserted 3 Names - Date1, Time1, and Dept1 and indicated the ranges on Daily Sheet.

Thinking that If I could get SUMPRODUCT to work, then I'll create Date2,Date3,etc & add each result together..
But all I got is #N/A
My formula on Totals page was =SUMPRODUCT(Time1;Date1=$A3;Dept1=$B$2)..
I'm returning to Mr Programmer's page on SUMPRODUCT.. I must of missed something or there is something set wrong on setting? :crazy:
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by FJCC »

Code: Select all

=SUMPRODUCT(Time1;Date1=$A3;Dept1=$B$2)
I don't see cell ranges corresponding to the names Time1, Date1, Dept1 that are used in your formula. Instead of using names, use cell ranges like A2:A10. If you can't get the formula to work, upload the spreadsheet with the formula included.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by Cat101 »

Cell ranges are in the Names area.. they serve as a substitute rather then the array
Date1=$Daily.$A$2:$A$29
Dept1=$Daily.$E$2:$E$29
Time1=$Daily.$E$2:$E$29

I think I tried it long handed before setting the names..
Should I upload my file again?

oh DARN, in doing that recap I have two E columns... AUGH.. LET ME TRY AGAIN W/ THE RIGHT COLUMNS
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by Cat101 »

smh
Time1=$Daily.$F$2:$F$29
and still #N/A

I'll re-upload with the arrays.. give me a minite
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by Cat101 »

Here the sheet is with total formula long handed.. Thank F3CC
Attachments
BlackBook.ods
(12.04 KiB) Downloaded 282 times
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by FJCC »

I changed the formulas in columns E, G, and L of the Daily sheet to have this form:

Code: Select all

=IF(ISNA(VLOOKUP ($B2;Jobs;3;0)); "";VLOOKUP($B2;Jobs;3;0))
It checks if the VLOOKUP() returns NA, which happens when B2 is not present in the Jobs list. If so, the IF() returns "". If B2 is found in the Jobs list, the result of the VLOOKUP() is returned. The SUMPRODUCT() formula in Totals now returns 0 instead of NA.
Attachments
BlackBook_fjcc.ods
(13.72 KiB) Downloaded 483 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by Cat101 »

Thanks FJCC for cleaning up my daily sheet, but my challenge is on the "totals" sheet..
I need the total number of minutes per each dept. with the formula in B3..
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by FJCC »

I think I did fix the results on the Totals sheet. The formula in Totals.B3 (In BlackBook_fjcc.ods) returns 0 because there are no Pre-Set values on the Daily sheet. If you put the following formula in Totals.D3 (In BlackBook_fjcc.ods), it returns 20. Isn't that what you want?

Code: Select all

=SUMPRODUCT(Daily.$F$2:$F$29;Daily.$A$2:$A$29=$A3;Daily.$G$2:$G$29=D$2)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Cat101
Posts: 135
Joined: Thu May 23, 2019 4:06 am
Location: Midwest

Re: Sum Time for Depts from a grid - matching Dept & Date

Post by Cat101 »

SMH.. I should of saved your version.. Thanks FJCC :bravo:
Apache Open Office 4.1.14
Windows 10.. tho we do bounce around :/
Locked