I'm using a calendar layout in Excel, and the start of the week (monday) is given by the function WeekStart. However, English is not my native tongue and I want to change the names of the weeks and months. I have managed to achieve this by adding a language code snippet in the code before the other days of the week/months, but no combination seems to work with the function WeekStart.
I'm sorry for clumsy writing, I really don't know how to express this specific problem properly because I am not even entirely sure how this function works. I've added an image for illustration. This is the template that I'm using https://templates.office.com/en-US/Evergreen-calendar-tabs-white-TM00000047 .
Thanks in advance.
screenshot
So, you could, if your weekstart function is in cell A1, then in cell B2 have:
=vlookup(A1,A5:B11,2,0)
With the days in A5:A11 as Monday to Sunday and in B5:B11 the days you want to change to.
Related
Consider the following table of employees.
It's fairly simple right? Clock in when you start, clock out for lunch, clock back in after lunch, clock out when you leave. But can someone please tell me what time these employees actually started? So for example how would you go about saying Tom was here at 6:51 AM and not at 12:23 PM?
For more reference, all entries look like this. They have at least 4 entries, (some one, no lunch).
How do I go about writing a formula that returns the start time?
I edited the table and added a helper column for the date. See below.
ANSWER:
=AGGREGATE(15,6, $C$2:$C$7/((A11=$A$2:$A$7)*(B11=$B$2:$B$7)),1)
If the working hours are within the day, you can search for the smallest time. If there is a night shift over midnight, then there is a problem ...
=AGGREGATE(15,6,(1/($A$2:$A$5=A2)*(INT(B2)=INT($B$2:$B$5)))*($B$2:$B$5),1)
I've written down this formula for range E2:
=IF(AND(A2=A3,TRUNC(B2,0)-TRUNC(B3,0)=0),MIN(B2,B3),IF(AND(IFERROR(TRUNC(B2)-TRUNC(B1)=0,FALSE),E1=MIN(B2,B1)),"",B2))"
Since english is not my default language on Excel, i've just manually translated it. Anyway, just in case, here is the VBA code to paste it in range E2:
Range("E2").FormulaR1C1 = "=IF(AND(RC[-4]=R[1]C[-4],TRUNC(RC[-3],0)-TRUNC(R[1]C[-3],0)=0),MIN(RC[-3],R[1]C[-3]),IF(AND(IFERROR(TRUNC(RC[-3])-TRUNC(R[-1]C[-3])=0,FALSE),R[-1]C=MIN(RC[-3],R[-1]C[-3])),"""",RC[-3]))"
I've tried various configurations and it works for me. Only point: list must be sorted by Name and Clock In.
The problem that I'm facing currently is I have a start date and end date for multiple different items. What I want to do is be able to see when a report would be due at each given month that it's accounted for with a end report (+14 days from end date). For example:
The Lookup tab that I have for reference of the dates above to be able to match the months looks like this:
Now I'm having trouble creating a formula that would actually work with this. If I'm thinking correctly it would be something like,
IF Start Date != Start Month then IF Start Date is between March Dates, "Report", . . . IF End Date hits, add 14 days, then "End Report" on given month after 14 days.
So for the example above the outcome would look like the following:
This is the end result that I would want in the end. Due note that August for Battlefield 5 is supposed to be blank due to the game ending on 8/19/2018, +14 days for a end report: 9/2/2018 is the End Report date so their would not be a Report in August for that given scenario. (I think this is possible but not 100% sure for the August scenario)
I am open to any kind of formulas/Arrays/VBA's that would accomplish this task. I'm just having difficulty coming up with a solution for this that has been bugging me for a while, so any help is much appreciated!!
If anything needs to be further explained please let me know and I will do my best as an edit to this post.
-Maykid
Based on what you explained, you could just have a simple formula as such (no need for VBA):
LOCALISATION OF THIS FORMULA (E2) UNDER FEBRUARY 2018 in the picture attached
=IF(AND(MONTH($C2)=MONTH(E$1),MONTH($C2+14)=MONTH(F$1)),"",IF(AND(MONTH($C2+14)=MONTH(E$1),YEAR($C2+14)=YEAR(E$1)),"End Report",IF(AND($B2<E$1,($C2+14)>E$1),"Report","")))
And then you can drag this formula.
I hope it helps.
BR
I'm creating a daily scheduling report. Not every position in the report has to be staffed every day, but there's rules determining this (daylight savings mostly) and I've been pulling my hair out trying to figure out a good way to do this that will make it anyone-proof for the person that needs to fill out the sheet on any given day.
My issue: Starting the first sunday in november, one position doesn't need to be staffed all the time. This continues until the second sunday in march. I want the box that shows this position to be conditionally formatted based on what today's date is (which is shown in E1 using =Today() )
I got something close to working (though it looks disgusting), and would cite sources, but I just came back to working on this project after a couple months of a different assignment:
=IF(MONTH(E1)>10,AND((DATE(YEAR(E1),11,1+7*1)-WEEKDAY((DATE(YEAR(E1),11,8-1))))<E1,E1<(DATE(YEAR(E1)+1,3,1+14*1)-WEEKDAY((DATE(YEAR(E1)+1,3,8-1))))),AND(DATE(YEAR((DATE(YEAR(E1),11,1+7*1)-WEEKDAY((DATE(YEAR(E1),11,8-1))))-1),MONTH((DATE(YEAR(E1),11,1+7*1)-WEEKDAY((DATE(YEAR(E1),11,8-1))))),DAY((DATE(YEAR(E1),11,1+7*1)-WEEKDAY((DATE(YEAR(E1),11,8-1)))))),E1<(DATE(YEAR(E1),3,1+14*1)-WEEKDAY((DATE(YEAR(E1),3,8-1))))))
It seems to kick in during the SECOND Sunday in November. I'm particularly flummoxed now. It's been an interesting intersection of "I'm pretty good with computers and layout design" and now all of a sudden diving deeper than I'd ever thought i'd go in excel. Keeping that in mind, I'm starting to feel a little out of my depth already and I'm sure VBA could do this easily but I wouldn't know the first thing about what I'm doing which means if anything ever goes wrong because someone accidentally deleted something I won't be able to fix it.
TL;DR: Trying to hit a moving target of a date based off of a dynamic entry in E1. Based off of E1 find the first sunday in november and the second sunday in March of the following year (or i suppose current year once we roll back around to january)
=OR(DATE(YEAR(E1),11,15-WEEKDAY(DATE(YEAR(E1),11,1),2))<=E1,DATE(YEAR(E1),3,15-WEEKDAY(DATE(YEAR(E1),3,1),2))>=E1)
alternatively you can replace E1 in the formula with TODAY(). This equation will evaluate to True or False
Im creating an excel pay sheet so i can keep tabs on my pay.
I have two pay rates,
£9.30 is paid for hours worked from 6pm to 8am Monday to Thursday
£10.30 is paid for hours worked from 6pm Friday to 8am Monday.
I have a column that displays the pay rate, i want this to populate automatically with excel looking at the day of the week and then the start time and then returning the correct pay rate.
For example,
If the day is a Mon and the start time is 6pm return £9.30
If the day is Fri and the start time is 6pm return £10.30 etc etc
Any one have any ideas on how i can achieve this? Id rather this be formula based instead of VBA if possible but if it cant be formula based then VBA it is.
Thanks in advance
I had to make a few assumptions because your question was unclear about the possible start times for your shifts. Your wording and examples lead me to believe that your shifts always begin at 6 PM regardless of the day. I created a possible solution or start to a solution based on that assumption that does not rely on VBA. I've included links to an excel workbook with my solution and a screen shot. (I'm only allowed 2 links with my current rep.)
As Gowtham Shiva suggested in the comments, a screen shot of what you have so far would be helpful.
I created two tables and a named ranged called “valDays”. To use the workbook, you enter the date and start time for your shift in tblPay. Enter the pay rate for a specific day and time in tblRates. valDays provides a way to convert the text for a day of the week into a number for calculating date/time serial numbers.
Feel free to comment/message me for clarification. I’ll do my best to reply and refine the solution as necessary. I hope you find this answer helpful and appreciate feedback. This is my first time providing an answer on Stack Overflow.
I’m going to assume you know how to name a range, create tables, and rename tables in excel. If you don’t there are plenty of YouTubers and bloggers that cover these topics quite well.
List the days in a column off to the right. (I used column K.) “Sun”, “Mon”, “Tue”, etc. Select all the cells with the days of the week and name the range “valDays”.
Formula in tblRates[Serial]:
“=MATCH(tblRates[[#This Row],[Day]],valDays,0)+tblRates[[#This Row],[Time]]”
Formula in tblPay[Serial]:
“=WEEKDAY([Date])+[StartTime]”
Formula in tblPay[Rate]:
“=INDEX(tblRates[Rate],MATCH([Serial],tblRates[Serial],0))”
You can download the excel document and view these screenshots of a possible solution.
Link to Excel Workbook on Google Drive
Screenshot1
I am having such a strange problem when importing data from CMS Supervisor into Excel,
Basically the time is coming out as, for example: 12:30
This is meant to be 1230 seconds, but the format it is coming out as doesn't correspond to this at all.
I've tried every combination of export settings in my vba and it makes no difference, it still ends up formatting the number in this bizzare way.
This is such a simple thing and is driving me crazy! Any help would be greatly appreciated!
Many Thanks,
Would it be ok for you to solve this using a formula? That way you can paste the formula in another column like this: =TEXT(A1,"hhmm")
I've taken the assumption that your time field is in A1
Because my language settings are dutch my formula is =TEXT(A1;"uumm"). Don't worry about that.