I have a comparison model that looks at two weeks of data. I am trying to get around the deletion and insertion of records week on week. With the code below, I can currently find and correct the deletions and insertions to the list, and then resort the list so that the comparison will work.
Sub CheckForNewProjsRemovedProjects()
Dim MyCell As Range, oCell As Range, NewCell As Range
Dim Rng1 As Range
Set Rng1 = Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
' Columns("B:B").Select
Range("B1:B" & Range("B" & Rows.Count).End(xlUp).Row).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"C1"), Unique:=True
For Each oCell In Rng1
For Each MyCell In Range("C1:C" & Range("C" & Rows.Count).End(xlUp).Row)
If MyCell.Value = oCell.Value Then................
I am new to VBA & not sure of the full understanding of code copied from a workbook which worked on the same principle but with Monthly (12) tabs. I thought if modified to show weeks, the macro would be able to locate the current week tab & day/date within - but upon opening, the cell stops at WK19 & column O - rather than WK43, Column N (which changes daily).
I was wondering if there's a way to add a formula to calculate week over week % change automatically every week when I enter in new data. see the attached excel file for reference.
What I would like to have is the ability for the formulas in c5 and f5 to be able to auto-update to the newest week and the previous week's data instead of manually having to update it each week. So if I were to add a new row with data for week beginning 12/2, the formula in c5 and f5 would automatically update to calculate the week over week variance. I tried researching prior to asking the question on this forum, and I think it may be possible to do it using the index match function, but I'm not sure how to apply it in this case.
I have a running time sheet daily. It has 2 columns for Labor and 2 columns for travel i.e. travel From / To 1300-1400 calculate 1 hour then travel home 1600-1700 1 hour this is calculated by the date entry 01/02/10 I have another calculation that tracks by the date i.e. 01/02/10 then Next job which all works fine.
The problem becomes how do I calculate a weekly total labor and travel by the date So added another column called weekly hour’s labor and use the Weeknum to determine which week is which day/date so the first Monday in January 2010 is week 2
2 problems Having many multiple day / date entries are the same date x 7 days Monday –Sunday (Relies on the date entered and the weeknum) 01/03/10 each line is complete however the dates carry over as does the time
When trying to calculate each row x 3 same date time then the value will be incorrect I need to calculate Say 9.5 hour labor from the date 01/03/10 not 28.5 hours and then calculate the total weekly hours 01/03/10, 9.5 hours labor, 3 hours travel 01/03/10, 9.5 hours labor, 3 hours travel 01/03/10, 9.5 hours labor, 3 hours travel
i do have work and travel times for each job on the same line (separate columns) but I display the total here by date to summarize the totals i have tried sum products and sumif to avail. I am using Windows XP SP2 with MS Office 2007
how do i calculate weekly hours by date and weeknum ?
I need to copy the values of a range on the weekly sales worksheet to the monthly sales worksheet. The last column is the total on the weekly sales. Part of the heading of the total column is the week ending date (e.g. 10/17/2009. On the Monthly Sales I have the months in columns by week ending (e.g. 10/17/2009).
Range I4:I28 to the monthly sales worksheet by date.
I had a column of text and numbers in col A; day of the week and date (taken from a web scrape, so have no control over how they are imported), such as in the following example. Additionally i have put a column of one's beside it in col B, and then summed them in col C.
If i parse the text from the numbers, and then use a filter to remove Saturdays and Sundays, the sum total of col B will still remain the same. What i need is a method to totally delete or neglect Saturdays and Sundays so that the sum would equal 10 for example. Note that the data is updated daily, so in A1 today will be Friday 16/08/2013, but A1 tomorrow will be Saturday 17/08/2013. Also note that i have used 1's in my example, but that is just for explanation purposes, the actual data is varied.
I have just spent the last two days making this spreadsheet only to realize that weekend data is totally messing up my calculations.
Is it possible to format cells to convert a date format of month/day/year to = year/week #/day of week? For example, 04/05/07 (April 5, 2007) would read as 7145, (7=last digit of year/ 14 = week number / 5 = day of week....Sunday being the first day of week)
I need the name of the day of the week from a date that has to be put together. This is going into a label on a UserForm.
I have a named range called wbDate. It is the month & year. The day of the month is the value of a TextBox (TBDay) on a UserForm. When I tried to combine these items, I used this
What I want the formula to do is look in Column A find all of the dates that are in week # whatever and then look in column G and add all of those $ amounts. So the result would be...
I created a pivot table with daily dates listed from 1/1/2009- 3/31/2009. 3 months worth. I see i can group this data by hours, days, months, quarters and years but what i really need to do is group this by WEEK. Does anyone know a formula I could use to accomplish this?
Can somebody have a look at the workbook that I've attached.
I have set up a timeshhet calculator for work but the thing is, the hourly rates of pay are dependent upon the day of the week the Operative is working, and the time of the day.
We split the shifts AM & PM and the rates are decided as per the worksheet contained within the workbook "Rates".
The problem I am having is how to get the timesheet to understand the days.
For example, if an Op works the Sat night or Sun night, then the rate should reflect x1.5. If it's Sat/Sun daytime, then it's x1.25.
Again, and as per the "Rates" sheet (see top for the rate multiplier) Mon - Fri 09:00 - 17:00 is flat rate/standard hrs. If the work Mon - Fri evenings, then the rate is x1.25.
I'm trying to set up a simple macro to loop through some number of dates on a sheet and blank out fields next to every instance of Saturday and Sunday. The only problem I'm having is actually finding the values "Saturday" and "Sunday"
Given a date in this format: 01/01/2009 I can convert to "Thursday"
Problem is, the vba code still "sees" 01/01/2009
I've tried copy / paste special / paste values to no avail. I've tried changing it via VBA (a few different methods, including strings, formats, etc) with no luck. Even tried referencing my date cells from another spreadsheet and pasting the values back in. Can't seem to get 01/01/2009 to be "Thursday"
I normally use the WORKDAY function in order to create an involved scheduling program. However, I have no idea how to create a formula that would count Saturdays as a workday. I usually type in one date and then the dates kick out to an end date several months later. How do I create a formula to include Saturdays on a daily projection (e.g. A1=8/12/06, A2=8/14/06, A3=8/15/06,etc...)?
Outlook allows you to easily specify, but eExcel always treats Sunday as the first day of the week by default. Yes you can manipulate that within formulas and functions, but if you use the autofilter in excel and choose "this week" (or "next week", or "last week") excel considers Sunday as the first day of the week. I would like to know how (or if) this can be changed to Monday as the first day of the week.
I've been trying to write code to filter a list of date base on day of week (Mon, Tue, etc)
My problem is that i can't find a way to code the filter criteria... since the date does not contain any week of day constant. i don't want to create another column in my sheet to show the week of day constant and filter this instead.
Here's my not yet finished code...
Sub DayOfWeek() Dim sAnswer As String Dim bWkDay As Byte Dim loMyData As Range Dim iFilterCriteria As Integer Dim Dateserial As Integer Application.ScreenUpdating = False
sAnswer = InputBox("Please select day to display data (first 3 letter of the day, eg. mon)", Title:="Select day to display")
I have a spreadsheet where column a = date, b = weekday and c= total calls. I have this array formula to get the true average for the entire month. {=average(if(isnumber(c4:c34),c4:c34))}
The question is can I do something similar to get a true average adding in the day of the week?
What I need is the average amount of calls per weekday.
Its because I want 2 different conditions as you can see above, matching both a week, and a season before summing the values. I can get it to work on a week, but then it will add up every matching week in all different seasons, and i can get it to do season, with no week but not both together :f
I am also using the following formula to return the date in Cell BE1: =TODAY()
I am using the following formula to give me the ISO week number in Excel in Cell BE2: =1+INT((BE1-DATE(YEAR(BE1+4-WEEKDAY(BE1,2)),1,5)+WEEKDAY(DATE(YEAR(BE1+4-WEEKDAY(BE1,2)),1,4),2))/7)
and the year in Cell BG2: =YEAR(BE1)
I then use the following to give me the wk and year in this format "wk-yr", i.e "6-09" in Cell BF4. =CONCATENATE(BE2,"-",RIGHT(BG2,2))
My question (finally) is that I am using this in a sheet that tracks issues that have deadlines. I manually enter in the dealine in the format "wk-yr". I have conditional formating that then colours a cell amber if it equals the current week and year, which is given in Cell BF4.
I want to use a traffic light system that will flag all issues in the weeks before the current week red, and the weeks after the current week in green, i.e. red = late!! I can't get my head round how I use a formual in teh conditional formating to correctly identify the relevent weeks? Any one any ideas? I could have the following situation for example (assuming that the current week is wk6 2009) and the formating should apply the colours as per my brackets:
I have a project I am working on that I need to be able to determine if the date is a Monday. If it is I look at date for the previous friday, if not then just the previous day.
Is it possible to format in a macro such that dates that you extract from another workbook can be reformatted in such a way: mm/dd/yyyy Day, for example, :03/23/1990 Sun?
I have a series of data in different columns, one of them is the date (daily, for like 5 years, exept weekends and national holidays), but I want to make another table with weekly data (which should be the sum of the daily data in a week, for each column). I thought there might exist any combination of formulas for that, to put once and drag it, and maybe it's pretty obvious, but even though I thought about it a lot, I couldn't find the solution.
I have some keys in a file that are of the form WK05, meaning that it refers to the 5th calendar week (of this year). I would like to write a function that gives me the first day of this particular week, in this case it would be 28/1/2008