Excel Time sheet issue for Clocked hours - excel

I have a time sheet that shows the Employee Name what action they performed and a unique identifier to the part they are working on in the WO #. I need a way to give a report to each employee of the work they performed on each day (Should be 8 hours). I need to find a way to extract in a different sheet or separate each employee per day and add up the hours for them.
Image of data that needs to be fixed
I can manually sort it and extract the data but I can't spend the time doing the manual extraction every time. The data comes in text csv file so to get the dates correct I already perform a
Sub ApplyF2()
Selection.Value = Selection.FormulaR1C1
End Sub
to the date to get the dates correct

Related

Is a date within several date ranges

I'm trying to put together an excel spreadsheet to show the day-by-day impact of stays by 3rd country citizens in the EU's Schengen area (it's a fairly complex rolling 180 day window). At the moment, I have a column with every day from a start date (so lots of rows) and another where I enter a 1 if there was a stay in a Schengen country for that day. Then other columns calculate when the 180 day period started and how many days have been in Schengen for that day.
It's a bit of a faff having to enter a 1 for every day away. I'd like to have another worksheet where I simply enter the start and end dates of (an arbitrary number of) each stay and then the calculation spreadsheet simply works out if each date falls within a stay or not. Working out whether a date falls within one date range is pretty straightforward, but working out if it falls within several date ranges isn't obvious to me. Any suggestions please?
After a very fair comment, here's a couple of images that hopefully illustrate what I'm trying to do (please ignore the colours).
Example of date ranges, but the number of these should be arbitrary:
The calculated sheet - currently I have to enter the 1s individually whereas I'd like them evaluated from the date ranges:

Power Query - Best way to count data from another workbook and store the value after the data is updated?

I have a workbook containing several thousand records. Each day the raw data is refreshed by downloading a master file from a central system and saving over the existing file. I need to create something that will count the number of records that match a certain criteria (i.e. how many belong to my department) and store the number in a table each day, i.e. Monday X, Tuesday Y, Wednesday Z etc.
Many years ago a colleague developed a macro to do this by opening the source file and copying the source data into a new file, but it is also programmed to produce several other MI reports within the same macro that are no longer needed, the VBA code is extremely long and complex and the whole process takes around 2 hours each day.
I'm fairly new to Power Query, but I know I can import the data in seconds and use a simple Countif to tell me what I need to know, but obviously once the data refreshes the following day the value from the Countif will update too. Instead, I need to store the values of the previous days and weeks to retain the count in one cell and the newly refreshed value in another. It also needs to be something very simple that a complete beginner could update at the click of a button to automate the process.
Can anyone suggest the best way to do this? Thank you in advance

Restructuring Excel Spreadsheet Data

I have an Excel spreadsheet with membership data, which includes each member’s coverage start date and coverage end date (if applicable) among many other data fields. I’m trying to restructure the data so that each month that the member’s coverage was effective is represented by a single row. For example, if a member has a coverage start date of 1/1/2019 and a coverage end date of 12/31/2019, the member’s information would be displayed 12 times. If the member has no coverage end date listed, then the number of rows listed for that member will be based on the number of months between the coverage start date and a date defined by the user.
To further complicate the issue, there are instances within the data that a member is displayed more than once due to changes in various coverage options so the total number of rows for a particular member will need to represent all months in which their coverage was in effect.
Any ideas/suggestions as to how to accomplish all of this?
The answer depends on your needs moving forwards. Changing the data to a per-month format and maintaining it that way is different than continuing to maintain the original data, and also needing to convert it to this new format. Consider that carefully when you choose how to do this. You might make things more difficult for yourself moving forwards.
In order to convert the data you currently have (which I assume is one line per member) to the data you want (one line per month per member) I would write a VBA script which would loop through the entire first sheet and do the steps to get it in the format I want. If you are not VBA saavy, you can do this with filters. The steps for manual filtering would be:
Find the earliest month you have (Let's say for this example that is January 2000), and filter your data for that month only.
Copy the filtered lines only to a new sheet. This is your January 2000 data.
At this point, you can either modify the lines you just copied so they indicate they are January 2000, or name the page January 2000, and keep each month on its own page.
Do the same for the next month. Continue until you have all of your data sorted by month.
At this point, you can modify and recombine the data, or leave it in separate sheets.
For a VBA solution, I would go line by line through the original data, and copy the line to each location in belongs in based on start/end dates. If separate sheets, I would pre-create all the sheets I need.
Good luck.

Creating a sum based on a category within a date range

I'm trying to make a spreadsheet that I can easily take an export from Mint.com's CSV outputs and get them into my Excel budget.
To do so, I need a way to populate each field within a date range. I'd like to avoid macros if possible (I don't know how to make them).
I'm happy to share my finished .xls with the public!
I've imported Mint.com's data in a manner that has column S for the date (3/30), column V with the cash value that I need to add up, and column X for the spending category.
I need to tally each month's spending ($V) by category (column X).
Through research, I devised this (for my January "Gas & Fuel" spending):
=SUMIFS($W$2:$W$900, $T$2:$T$900, ">="&W$12, $T$2:$T$900, "<"&(EOMONTH(D$1,0)+1), $Y$2:$Y$900, "="&$B5)
However, it required that I reformat my Dates, which is an issue because this would become specific to each year and I would need to change the fields every year. I'd like the document to be usable without adjustment using my spending data from the past and future.
Is there a way to take the year out of the equation? To make that formula above work, I renamed my column from "January" to "1/14".
Here is what the spreadsheet looks like
Thanks!
A pivot table would work best with that data.
Initial set up would show each day separately, but by using Grouping
(here) ^^^
you can group the data by month/day/year/however

Attendance Calculations / Period Calendar

This is a multi-tiered project. Let me give a quick overview. I have attendance data, card/ timestamp punches. I would like to have a pivot table with slicers in Excel. Ideally you'd be able to choose a department / last name / associate number. And also a period of time. Ideally this would be a table with the company period/week. And maybe default to last weeks.
I can get at timecard data in two ways:
(1) generate a CSV that automatically performs the timecard math, to figure out how many hours someone worked and it is smart enough to understand 3rd shift workers. The format of that CSV is:
Last Name, First Name, Personnel Type, Associate Number, Facility, Department, TimeIn, TimeOut, Total Hours
The problem with this method is that I would have to manually append the information to the CSV tables. Or come up with some autoIT script.
(2) Get at the raw data via sql/odbc. This way the math is not done. It is just all of the associates timestamps. I would have to figure up the daily hours myself and figure out a 3rd shift formula too. It is not a set schedule, many people swing shifts and others get called in a lot.
Lastly, I would like to be able to filter the dates by using our company fiscal calendar. I have a spreadsheet that goes from 2000 to 2093. With everyday listed and it's corresponding year/period/week.
Example period info spreadsheet:
date Year Period week WeekTotal Period Total
12/3/2007 2008 1 1 2008.1.1 2008.1
12/4/2007 2008 1 1 2008.1.1 2008.1
I know there is a lot going on here, but what would be the best way to approach this project?
First I have not been able to post any script however the last I tried it I used two options 1. Was a php conversion where the time was numbers ( which makes it easier for calculations)
2. Was in the tables where I deliberately entered the values places the time in different columns or fields for hours, mins, and seconds this meant that while the input is eased I still have to calculate the output in php especially for totals, averages and differences.
Hope it helps a bit

Resources