If I have a formula which adds the value of each day of the week and divides by 7 to get an average per day, how do i fix it to get an average if their is a holiday so their would only be 6 days without changing the formula as the holidays could change from week to week by province.
=(a+b+c+d+e+f+g)/7 what happens if "e" is a holiday and I need to divide by 6, or in the case of xmas if "d and e" are holidays and I need to divide by 5?
I'm trying to return the average, min and max values of a range that will have errors, be blank or have zeros. I have already found an array formula that works getting rid of the errors but the zeros are now a problem.
{=AVERAGE(IF(NOT(ISERROR(D27:G27)),D27:G27))}
I was thinking that an OR might be needed but for the life of me can't figure out where it belongs. I will also be using this formula with both MIN and MAX in the adjacent cells so it would be great if all I have to do is swap those in for AVERAGE. I'm not keen on how array formulas work, just found an example similar to this on the interwebs, and I'm curious why if the array brackets are removed the value returned is 0 and not an error.
Workbook is proprietary so VB is locked and not an option (not sure if it was but wanted to be clear).
Trying to determine the best way to do this. I understand that the standard AVERAGE function will ignore blanks if given a range; the function I'm using does a search for a particular value to determine if a value is to be included in the averaging: ...
What I have is a spreadsheet with a whole bunch of sporting data on it. see attachment for an idea of the layout, Stats.jpg
In these data each round a player is given a rating. What I want to do is calculate is the average rating for each player across the last 3 and 5 games they have played. When a player misses a game they get a rating of 0 for the round. I want 0 ratings to be ignored in the running averages. Additionally, games yet to be played have a 0 in the cell and should be ignored. To get overall averages ignoring 0's was simple I used the averageif function, but I couldn't figure out how to use that but only extract the last 3 non 0 values. I currently have data up to round 12, so if a player has played in 12, 11 and 10 then the 3 round average should just be the average of these 3, but if they missed for example round 11 then the 3 round average should return the average of 9, 10 and 12.
The data is set out in the following way.
In column B I have a list of player names from cells B3:B618.
Across row 1 from N1:AM1 are labels "round 1" "round 2" etc.
The ratings for each player in each round are in N-AM and from 3-618. i.e. N3:AM3 contains the weekly rating for player 1, 4 contains player 2 etc.
I would like the 3 round averages to be returned for each player in column L and 5 round averages in column M.
However, in some cases, the cell to be looked-up may be blank. Using the formula above, the result of these vlookups is "0". I want to take the average of these vlookups excluding the blanks from the 'Raw Data' sheet.
I need to average the columns of data and ignore both hidden rows and zero values. I have tried writing if statements as well as the subtotal function. Both functions either ignore null values or hidden rows but not both.
The system wont let me update a sample workbook but Im wondering whether there is a formula or combo formula for this.
I have a column of numbers that are derived with a formula. I need to Average only the ones that either have a Positive or Negative number, ignoring blanks or zero.
I have tried Search but couldn't find anything that address both blank and zero.
I have this formula for determining the numberof days in the current month, excluding today.
=NETWORKDAYS(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(1)),TODAY())-1 Now I need to exclude the holidays.
I'd rather not add another named list or table so I thought I'd use an array constant but can't get it to work. This is what I added:
{=NETWORKDAYS(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(1)),TODAY(),{DATE(2007,10,10);DATE(2007,10,11)})-1} Okay, I used oct 10 and 11 as an example to insure the formula is working. But it doesn't work and I can't figure out why.
I have written a workbook to show when a certain days order requirement needs to be submitted to our supplier, using WORKDAY and referring to a named range of holiday dates. This resulted in the correct day and dates being shown against the date on which the order needs to be placed, but had the same date down for Fridays, Saturdays, and Sundays, together with any holidays. I have got around this by using the fill option workdays only, so Saturday and Sunday are not listed. I wish to find a way of formatting, ie greying out any bank holidays to avoid confusion.
I have managed to get the desired effect by using
=MATCH($B3,holidays,0)>=1,
but think there should be a better way of doing this.
I am generating a spreadsheet that focuses on a target opening date. There is about 12 other headings along the top all stating the different phases of construction, permitting, etc. I need to exclude weekends and holidays from most of these columns, and only exclude holidays from about 2 of the columns. I think I am to use the formula for NETWORKDAYS, but not sure how or where to incorporate it.
1. Find the working days between 15th Nov 09 to 28th
2. Add a column that shows the date after a number of months from today date. The number of months from todays date for each of the country is mentioned in column No. of Months after which revised.
3. Find the date our training will end using excel considering the fact that SAT and SUN are holidays. (Use the date when your training started)
I have formula for working days which excludes holidays :
[Code] .....
Code works but I have monthly worksheet and macro for adding days in month. This formula's end date is in AI2 cell, which corresponds to 31th day of the month. Problem is that I get #REF error across all sheet when I delete last day columns, in month which have less than 31 days.
I know that this is the cell reference error because cell AI2 is deleted, but is there any solution for changing networkdays formula or replace It with something else that will work same, with range maybe ?
For now I just hide columns, which is o.k., but I would rather delete columns...
I have been asked to create a worksheet to calculate the percentage of the utilisation of a number of loan cars per month. Each of the cars may be used on each and every day of the week but the percentage utilisation is to be calculated on working days only. However it is essential to record the name of the driver of the car at weekends and holidays. Column A is populated with the dates of the month. Colum B is populated with the relative days of the week. In column C and subsequent columns I record the name of the driver of a particular car registration. Is there any way that I can count the number of drivers of each car on working days only and not weekends or bank holidays?
In column A is start of holidays In column B is end of holidays (one date written in A and one in B, and so on)
In C and D columns are start and end dates
Now I would like to check if start and and end dates of holidays, are between those dates in C and D
22/05/2006 24/05/2006
23/05/2006 24/05/2006
Check if first range of dates is between second one. Actually if holidays are between start and end date then check how many days are actually holidays in range of start and end dates
my sheet has departure and arrival dates and each row can be for a transaction in a different country (there is an additional column with a 2 character ISO country code like GB, DE, FR,..)
I need to calculate networkdays but not every country observes the same holidays. Networkdays function seems to allow a one dimensional list of holidays and I am looking for a 2-dimensional solution.
I'm trying to run the code below to add functions to a couple of columns untill the value of the cell is equal to "End". I am recieving the error "Object variable or With block variable not set (Error 91)" and I'm not sure why. I have set my WITH up and I have defined the object. Any thoughts would be greatly appreciated. Thanks.
Option Explicit
Private Sub CommandButton1_Click() Dim shtXL As Excel.Worksheet Dim wbkXL As Excel.Workbook
Set shtXL = wbkXL.ActiveSheet With shtXL Do Until ActiveCell.Value = "End"
I've been trying to automate the calculations on timesheets and having some trouble. I've attached a rough copy of part of the sheet to this post.
Here's where I'm struggling:
The timesheet has columns for Ins/Outs as well as Reg Hrs (Should never be more than 8), OT 1.5 (Standard 1.5 OT pay for anything over 40 in a week), OT 1.0 (More than 8 hours worked in a day but Vacation/Sick/Holiday/Funeral time keeps it below 40 hours actual work time that week) and then columns for Vacation, Sick, Etc.
Now I'm confident that my Regular Hours works with the following formula:
If statement calculates how many hours worked, multiples it by 24 to put it in an hour format and checks whether it's greater than or equal to 8, if so then only show 8 (since any additional hours worked would need to be in the OT 1.5 or OT 1.0 category depending on the circumstances). If false, returns how many hours worked.
However, I am having some issues getting my OT 1.5 and OT 1.0 categories working correctly. The OT 1.5 column needs to check whether the actual worked hours is over 40 without Vacation/Sick/Funeral, etc included. The OT 1.0 column needs to show any additional hours worked beyond 8 each day but less than 40 over the whole week because of holiday/sick/vacation, etc.
So, if I worked 10 hours on Monday and there isn't any sort of paid leave time that week (and I work normal 8 hours the rest of the week), then Monday would show 8 hours in Regular worked and 2 hours in OT 1.5. Here's what I'm currently using for a formula (that isn't working...my latest addition was the OR statement):
If I worked 10 hours on Monday and there is some sort of Holiday (and I don't actually work over 40 hours that week not including the 8 hours of Holiday pay), then Monday should show 8 hours in Regular time and 2 hours in OT 1.0. Here's what I'm using for this formula (that also isn't working well and I hadn't started working with the OR statement here yet since OT 1.5 wasn't working) :
I am trying to compare values from this week to last week with the exception that will overlook holidays. ie, from Monday to last Monday. But I am running into an issue if there is a holiday in the week as my formulas are looking for the value 5 days prior to the current day.
I have a report that starts with a desired date and generates dates backwards on when certain releases should come out. I would like the code to see the date, move it back a week, check to make sure it's not a weekend or holiday, then post it in the cell below. If it does happen to land on a weekend, it should then be the Friday before the weekend. If it is a holiday, it should be the date before the holiday, as long as it is not a Sunday (or another holiday).
Attached is the workbook that I'm using. I'm starting with the desired date 'B7' and using the Holidays in a seperate worksheet. I know that in the current example, nothing will land on the weekend, unless the holiday pushes it back to one.