Automating Time Card Data Collection

McLaren

Board Regular
Joined
Jul 12, 2003
Messages
122
Good morning all. This is quite a bit above my head so I'm hoping someone can help me out. I use a mobile app to log in and out of projects, which then exports out as a csv that I copy into the 2nd sheet of my file like this:


Export.png




My 1st sheet looks like this:


Form.png


So I've managed to get the top half of the sheet grouping hours by day/client/customer using SUMIFS, but now I would like to populate the bottom half with Column D and removing the duplicates. So far I have managed to find a formula that works to isolate Rows using Column A:
Excel Formula:
={INDEX($A$1:$A$200,MATCH("Mon",$A$1:$A$200,0)):INDEX($A$1:$A$200,MAX(IF($A$1:$A$200="Mon",ROW($A$1:$A$200)-MIN(ROW($A$1:$A$200))+1)))}

But now I'm stuck. Any help would be greatly appreciated!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Figured it out. A bunch of the help came from this video. 1st step was 6 defined names to make dynamic ranges that look at the job(work unit notes) by isolating rows based on the day of the week in the imported sheet('Daily Job Description'). Each name matched the days of the week, Mon, Tue, etc.

Excel Formula:
=INDEX('Daily Job Description'!$D$2:$D$100,MATCH("Mon",'Daily Job Description'!$A$2:$A$100,0)):INDEX('Daily Job Description'!$D$2:$D$100,MAX(IF('Daily Job Description'!$A$2:$A$100="Mon",ROW('Daily Job Description'!$A$2:$A$100)-MIN(ROW('Daily Job Description'!$A$2:$A$100))+1)))

Then to populate the P/N row under each day

Cell B50:
Excel Formula:
=IFERROR(INDEX(Mon,MATCH(0,COUNTIF(Mon,"<"&Mon)-SUM(COUNTIF(Mon,B$49:B49)),0)),"")

Cell B54
Excel Formula:
=IFERROR(INDEX(Mon,MATCH(0,COUNTIF(Mon,"<"&Mon)-SUM(COUNTIF(Mon,B$49:B50)),0)),"")

Cell B58
Excel Formula:
=IFERROR(INDEX(Mon,MATCH(0,COUNTIF(Mon,"<"&Mon)-SUM(COUNTIF(Mon,B$49:B54)),0)),"")

etc.

Next up to get the number of hours I used a SUMIFS that looks at the P/N cell and adds up all instances within the defined name for the day. To prevent cells showing zeroes it was doubled up with an IF statement. Example of Cell B51:

Excel Formula:
=IF(SUMIFS('Daily Job Description'!$E$2:$E$100,'Daily Job Description'!$A$2:$A$100,"Mon",'Daily Job Description'!$D$2:$D$100,B50,'Daily Job Description'!$I$2:$I$100,"Program")=0,"",(SUMIFS('Daily Job Description'!$E$2:$E$100,'Daily Job Description'!$A$2:$A$100,"Mon",'Daily Job Description'!$D$2:$D$100,B50,'Daily Job Description'!$I$2:$I$100,"Program")))

Since they wanted Setup and Operate grouped together Cell B52 had to be done a little differently with an array constant:

Excel Formula:
=IF(SUM(SUMIFS('Daily Job Description'!$E$2:$E$100,'Daily Job Description'!$A$2:$A$100,"Mon",'Daily Job Description'!$D$2:$D$100,B50,'Daily Job Description'!$I$2:$I$100,{"Setup","Run"}))=0,"",SUM(SUMIFS('Daily Job Description'!$E$2:$E$100,'Daily Job Description'!$A$2:$A$100,"Mon",'Daily Job Description'!$D$2:$D$100,B50,'Daily Job Description'!$I$2:$I$100,{"Setup","Run"})))

The only thing it choked on in my initial test was a part number that was just numerals with no letters or dashes. It completely ignored it when populating the bottom half. The workaround for now was adding a rev letter to it.
 

Attachments

  • Untitled.png
    Untitled.png
    117 KB · Views: 4
Upvote 0
Solution

Forum statistics

Threads
1,215,026
Messages
6,122,743
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top