Working out calendar days from week number and day (42.1) - excel

struggling to find anything on here regarding my query, which leads me to believe it may be impossible but here goes!
my company creates products that take takes around two weeks to fully build from start to finish. The whole company works in weeks and days, for example we would start building on week 14.1 (14th week and on Monday) and finish building on week 16.5 (16th week and on Friday). The company is massive so I cannot convert them to use dates instead.
We want to capture data from a spreadsheet that has 5 columns, A = build week , B = build day, C = Completion week, D = Completion day, E = calendar days.
At present we just manually work out the amount of calendar days as it is difficult to write a formula to differentiate between knowing week 52.5 and week 1.1 is only 4 days.
is it possible to write a formula or use a VBA code to work out the amount of calendar days between two week numbers from the data I have or am I testing the limits of excel?
any help would be great.

Use:
=((C2+(C2<A2)*52)*7+D2)-(A2*7+B2)+1

Related

MS Excel sorting formula

Microsoft money used to be a brilliant programme for keeping track of a pension portfolio in that it showed value change weekly, monthly, 3 monthly and year to date, now it is no longer supported I have been trying to find an alternative. I now have an I Mac with MS excel on but am trying to do a sort and display on the following and try keep track as per MS Money did.
[Sample][1]
This data is updated weekly and would like to know if it is possible to replicate MS Money.
[1]: https://i.stack.imgur.com/BLahL.png
ok so lets try the things you said about and see if we can get you close:
name the ranges (link) dates and values
weekly movement (current value / value 1 week ago):
=SUMIF(dates,MAX(dates),values)/SUMIF(dates,MAX(dates)-7,values)
1 month movement:
=SUMIF(dates,MAX(dates),values)/SUMIF(dates,MAX(dates)-ROUND((MAX(dates)-EDATE(MAX(dates),-1))/7,0)*7,values)
3 month movement:
=SUMIF(dates,MAX(dates),values)/SUMIF(dates,MAX(dates)-ROUND((MAX(dates)-EDATE(MAX(dates),-3))/7,0)*7,values)
ytd:
=SUMIF(dates,MAX(dates),values)/SUMIF(dates,MAX(dates)-ROUND((MAX(dates)-DATE(YEAR(MAX(dates)),1,1))/7,0)*7,values)
this assumes those named ranges and that the date is exactly every 7 days apart. if also looks for the closest date to 1 month ago, 3 months ago and start of year.
also it does a current value as percentage of the start value for the period

Excel Formula for calculating time in round numbers with hours text

I'm trying to figure out a way to create an excel spreadsheet that will allow me to keep track of how many hours I've earned per each paid holiday my company offers, then keep track of how many hours I've used and what's remaining. But I'm unsure how to calculate this properly.
I could easily do the math my self as it's a simple lay out, but I'm trying to find a way that will just let me enter the numbers for earned and used and walk away from anything else.
What I'm trying to do is the follow:
Have multiple sections. In the first section it'll be my holidays. So in like Column A, working down I'd have New Years, Memorial Day, July 4th, etc. Column B working down would be time earned. But this would be labeled in each cell as "8 Hrs" or "4 hrs". Column C would be time used in the same format "4 hrs" "8 hrs". Then Column D would simple be hours remaining.
Now in the second section I'd have holiday hours earned, which is 2 weeks. Not too sure how to lay it out, and then I still have my sick days, but not sure if I should include that in section 2 or not with the vacation time.
I'd like a way to be able to simply Calculate B2 - C2 = D2. So 8 Hrs - 4 Hrs = 4 Hrs (to show 4 Hrs remaining for each line item.)
Problem is I'm unsure how to calculate remaining time simply because of the Hrs suffix. And with that I also can't calculate total time still remaining, both for holiday hours earn and vacation/sick hours.
Yes, it's easier for me to track it as 8 Hrs rather than 1 day, etc.
Any advice on how to formulate this. Or if anyone knows of a premade template that fits this type of scenario, that I could then just take and integrate into my own spreadsheet.
Sorry if this is confusing in any way.
Also, As I'm no excel wizard, unsure if this is relevant or not, but I'm using Excel 2016, as part of the Office suite.
Another option is to just leave the number as it is and label the column accordingly. Do you really need to see "hrs" in every cell when you know you are tracking hours?
Use a custom number format of,
[>1]0 \H\r\s;[=1]0 \H\r_);0 \H\r\s;[Red]#
... and treat all hours as integers.

Calculate annual leave between two dates in Excel

This task seems easy enough yet I just can't figure a way of doing this without resorting to vba.
All I need is to know the number of hours an employee has used up on annual leave, based on a start and end date, and their hours of work.
To be more clear, this example shows one employees contracted hours from Monday to Sunday i.e. they work only Weds, Thurs, and Friday, for 7.5 hours each day.
Below shows the start and end date that the employee has chosen to take for annual leave. I need to calculate, based on their contracted hours, how much annual leave is used between the two dates. The answer would be 45 hours in this case.
Here's another approach - I've expanded the days between the start and end dates into an array then used the resulting day numbers to offset into the days of work range
=SUMPRODUCT(N(OFFSET(A3,0,WEEKDAY(ROW(INDIRECT(A6&":"&B6)),2)-1)))
If you had a list of holiday dates somewhere (say in I3:N3) you could exclude them as follows
=SUMPRODUCT(N(OFFSET(A3,0,WEEKDAY(ROW(INDIRECT(A6&":"&B6)),2)-1))*ISNA(MATCH(ROW(INDIRECT(A6&":"&B6)),I3:N3,0)))
- it is a bit long-winded but the only way I can think of at the moment.

Excel function to create due dates that land on a business day

I'm stuck creating a formula that will calculate days before the end of the month then adjust to make sure it is a business day. For example: 30 days before 6/30/2015 is 5/31/2015 which is a Sunday. I need that to adjust to the Friday before.
I'm working on finding the due dates of a number of documents that are due a certain number of days before another date. For example: documents are due 30 days before the last day of the month. However, the number of days varies and the due date needs to fall on a business day (Monday-Friday). Sometimes it's 30 days, sometimes it's 60 days, sometimes it's 30 calendar days + 5 business days, etc.
I've been able to calculate 30 days + 5 business days with the following formula:
=workday(start_date-30,-5)
Any ideas how to adjust this so that I can just have the due date be 30 calendar days before a certain date but also always be a business day?
Using WORKDAY you can use a formula like this:
=WORKDAY(A1+B1+1,-1)
where A1 is your start date and B1 the number of days to add.
You probably need to write a macro function or maybe some nested IF statements in your cell's formula.
Take a look at http://www.mrexcel.com/forum/excel-questions/481558-round-date-nearest-workday.html
That solution moves forward to the nearest workday, but the principle is sound: just subtract instead of add.

Excel - Find if worker has worked certain OT if weekday and or Sunday

I have a worksheet with days running along the columns, within each day there are different hourly categories, 130%, 150%, 200% and 215% etc, there are other categories within each day, but these are not to be included. (Can't post Image as new, can email?)
If a worker works over 3.5 hours in any of these categories they get an extra lunch, except on Sunday's where they must work 4 hours.
I've been using countif's to check each day over 3.5, and another column for Sunday's.
The weekday and Sunday can be combined into the same column as the lunch price is still the same, just number of working hours different.
The main problem is I have to adjust the countif's every month, I want something that will look at days of the week and/or sunday's and check without adjusting every month.
Have been trying to get my head around sumproduct with countif!
Any help, very much appreciated.
Thanks!
Since you have not mentioned what is where this might take some adjustment, but may get you started:
=IF(SUM(B3:G3)>=IF(WEEKDAY(B$1)=1,4,3.5),"lunch","no lunch")

Resources