Using Countif To Calculate The Number Of Days In A Column

Dec 16, 2009

I am trying to use the following formula to count the number of times a day appears in a column. It doesn't seem to be working the way I want it to. =COUNTIF($A13:$A200,"Sunday"). It could be the way the days of the week are gathered on the sheet, you can see the attached workbook to see how I am using it.

I'm trying to calculate the number of days between dates in column A and B. I've looked at the examples in this site and thought I used the formula correctly, but the cell returns an error message when I type: =DATEDIF(A1,B1,"D")

How to create a spreadsheet with what I think will be a very simple formula?

If date in B2 - date in A2 is 1 or less days, put a 1 in cell C2. If date in B2 - date in A2 is 7 or less days but more than 1, put a 2 in cell C2. If date in B2 - date in A2 is 30 or less days but more than 7, put a 3 in cell C2. If date in B2 - date in A2 is 90 or less days but more than 30, put a 4 in cell C2. If date in B2 - date in A2 is 91 days or more, put a 5 in cell C2.

OR

Another, maybe simpler, way of saying it is:

If date in B2 - date in A2 is 1 or less days, put a 1 in cell C2. If date in B2 - date in A2 is 2-7 days, put a 2 in cell C2. If date in B2 - date in A2 is 8-30 days, put a 3 in cell C2. If date in B2 - date in A2 is 31-90 days, put a 4 in cell C2. If date in B2 - date in A2 is 91 days or more, put a 5 in cell C2.

I want to calculate the end date of my German courses. This is how it works:

A course consists of 60 LU*. The course can occur i. e. three times a week: Monday, Wednesday and Friday. In each day the course lasts 2 LU, which means 6 LU each week. There is no course on Tuesday, Thursday, Saturday, Sunday and on holidays. Therefore this type of course that begins on 18-Nov-2013 will end on 03-Feb-2014.

Another course which occurs Tuesday, Thursday and Saturday, and respectively has 2 LU on Tuesday, 2 LU on Thursday and 3 LU on Saturday and starts on 03-Dec-2013 will end on 06-Feb-2014.

Therefore I want to create a worksheet where I set the start date, choose the days and respectively the LU amount on those days. The end date shall be calculated according to these criteria.

The workday function on excel cannot do this and I do not have any programming skills to work with VBA.

I am trying to calculate the number of days between two dates where the arrival date is in b5 and the departure date is in c5 for each month. I have been using the following formula =IF($C5="","",MAX(0,MIN(L$1,$C5)-MAX(K$1,$B5))) but when the stay is a full year it is giving me 365 in a single column. I think maybe I need to add in the number of days in the month but not sure how to do it.

Our company has been taken over by new mgt (Y co) on 1st Nov 2012 from old mgt (X co). Y co has the policy of providing employees with EOS benefits as mentioned below:

1st 5 yrs - 1 month salary per year 5-10 yrs - 1.5 month salary per year +10 yrs - 2 months salary per year

But for deciding the slab, total period of service is considered. The below table provides the calculation of days as on 31st Dec 2012 based on different joining dates which I need to fix by way of formula.

Name Hire date Salary Total service (days) X co Y Co 1st 5 yrs 5-10 yrs +10 yrs

I have 2 dates a Start Date and an End Date. I need to calculate the number of days from Start to End over eight years with each of the eight years in its own column.

I have a start date formatted as dd/mm/yyyy in cell A5 I have an end date formatted as dd/mm/yyyy in cell E5

In cell F5 I would like the result of the number of days between E5-A5 (Excluding weekends) In cell G5 I would like the total number of days in the range F5:F25 In cell H5 I would like the total number of working days from A5 to Today

I am using the following formula to get the result in F5 etc =SUM(INT((WEEKDAY(A5-{2,3,4,5,6})+E5-A5)/7)) I have copied this down and in the blank cells I get #NUM!

In cell F? were there is no date entered in cell E? I get a minus number (which I can hide using conditional formatting), but the minus number obviously has an affect on the result in G5, as cell G5 gives me #NUM! instead of the result for the current numbers in row F

I need to calculate on a spreadsheet the number of days between a specific date and the date the spread sheet is opened. I need to know the number of days a merchandise has been stored.

I have a list of months in column A and would like a formula in column B that calculates the number of calendar days for each month (i.e. Jan=31, Feb=28 etc.)

I'm new here. I've searched these forums in the past for help, but never had to post, i've always been able to find something by searching. However, this time I couldn't find anything that addressed my specific need so I figured it'd be worth a shot.

Alright, I have two sets of dates, and i'm trying to set up a formular that calculates the numbers of days from the first date range that overlap/fall within the second date range.

For example:

In A3 type "1/1/2006" In B3 type "1/1/2007" In C1 type "6/30/2005" In C2 type "6/30/2006"

Now, in C3 i'd like to insert a forumla that tells me how many days in the date range of 1/1/2006-1/1/2007 fall in the date range of 6/30/2005-6/30/2006. Basically for this is should be half the year, however many days that is.

Need to calculate the number of days in December between two dates 11/20/2013 and 1/20/2014, how many days are in december? a formula that can calculate this?

I need to have a cell with a date in it then the next cell needs a formula to caluclate how many days it has been since that date???? I'm a real novice with excel.

I have been using Excel to display, sort and present data in a professional way. I have created a pivot table with two columns below. Column C indicates the start date. Column D indicates the completion date. Blank cells show live data. I need to determine the number of days. 1) That have been - completed - a) That were < 2 Days, b) >2 but less than a week, c) > than a week (all). I have used the following formulas. a) countif(D4:D61, "<3"), b) countifs(D4:D61, ">2", D4:D61, "<=8"). Easy for completed data. My problem is, how do I determine the number of days, live data that following the same queries as above. I have figured out I can use countif to count the number of blanks by - countif(D4:D61, "(blank)") but how to put it all together and what formula should I use. I am trying to use countifs or if statements but am totally lost.

Column C Column D ---------- ---------- 06/01/2014(blank) 25/11/2013(blank) 13/12/201314/01/2014 27/12/201317/01/2014 27/12/201310/01/2014

I'm trying to create a new column which calculates the number of days from the today's date to the due date of an invoice. Also a Column that an invoice is/was overdue.

Column A - Clerk inputs date that invoice was received Column B - Clerk inputs the date that the bill was paid Column C - Auto populates the due date of the invoice (20 days after the invoice is received) Column D - I want a number of days to auto populate based on today's date that will show how many days we have to pay the bill. Example: today is 2/19/2014, bill is due 2/22/2014 (Column C), column D should read 3 (I would prefer is the number is black for "we have days left to pay", red for "we're behind") *Extra bonus for Column D, if the column goes blank after a date is entered into Column B* - but not necessary

Column E - I would like if the date the bill was paid (Column B) is greater than the date the invoice is due (Column C) to show "Overdue" in the cell.

I have two date columns, a start date and end date. Another columns tells me the number of days between these two columns. It may return 45 days which actually straddle 3 different months.

My aim is to identify between this date range how many days in Apr 14. Then in the next column howmany days in May 14 etc

So on the spreadsheet Id have 12 columns for each month of the year. in Apr 14 for each row between the given date range I want it to tell me how many days are actually in April. Id then copy that formula into the May 14 column.

I was calculating the number of days between two dates using the Days360 function. However, now it is not accurate enough for me... Is there a function that is more accurate? based on 365 days and includes leap years... that I could use as I need this calculation to be exact? For example, number of days between April 1st, 2010 and August 31, 2012 is 884, but the days360 function returns 870.

I am trying to calculate the number of days since an employee worked. Column A has the date and columns B,C, and D show the name of the 3 employees who worked that day. Each row shows the next day in column A with the three employees who worked that day in columns B,C, and D. I need the format of the excel sheet to remain the same. I'm looking for a formula that will calculate the number of days since each employee has worked...there are 10 different employees and only 3 work each day.

I m trying to do is this. For every person in company there is a table 30 days (cells) long, and 3 shifts (cells) wide. Every shift leader fills in the data in the "calendar" so every day, for every person, he will fill in number of hours.

I have to make excel process the whole calendar 30 x 3 = 90 cells, into final results for our payroll department. So the end product of the excel table should be Person name, total work days, total sick leave days, holiday days, and so on.

specific problem i have is how to calculate number of State Holiday days. You can see my best attempt in the attached file.

if there is only one number / mark entered each day (in only one of the 3 shifts) thansumproduct works ok.

Im having a hard time creating the formula to calculate the min number of employees to complete a number of jobs that come in each day and need to be finished in 18 days or less.

Data that I have:

Forecast of the number of jobs for 251 days ( jobs range from 10 -80 per day) Each job needs to be finished in 18 days or less we need to staff a fixed number of employees for the whole year each employee can complete 4 jobs per day no weekends

I have 2 Columns of Holiday Dates (Column A is the "FROM" date; and Column B is the 'TO' date) and Column C is Peoples Names corresponding to the Holiday dates:

ie:

COLUMN 1 ; COLUMN 2 ; COLUMN 3 A1= 2 Jan 13 ; B1= 10 Jan 13 ; C1= Tom A2= 4 May 13 ; B2= 10 Jun 13 ; C2= John A3= 7 Jul 13 ; B3= 10 Jul 13 ; C3= Tom A4= 3 Aug 13 ; B4= 25 Aug 13 ; C4= John A5= 6 Dec 13 ; B5= 15 Dec 13 ; C5= John.

I am trying to figure out a formula (eg SUMIF) to calculate and summarize the number of Days Holiday based on a person's name (eg Tom's total Number of days Holiday days) based on the above column configuration of Dates and Names.

Our office has a vacation days accrual policy based on number of years worked. We have a vacation days number, based on year of employment, the employee earns monthly. I need help with a worksheet, formulas, to document each employee, the year of employment they're in, # of days they have available based on the current month (which would need to add up automatically as the year progresses), then any days they request off, and finally a remaining balance of days left.

Formula which can calculate how many days in a month and create a column for each day. Columns for day 28, 29, 30 or 31 also need the formulas in columns 1 to 27 copied over automatically. [sheet name "LARSheet1 to 1" ]

I'm trying to build "Leave, Attendance Management" system using Excel. I am about 40% there so far.

The basic structure of the workbook is as follows:

12x main monthly "Leave Attendance Record" worksheets (i.emonths April 2012 through to March 2013). [I will refer to these sheets asLARSheet1 to LARSheet12 ]. 1 x worksheet which holds "data validation" list andvlook up info. ["FormulaListSheet"] 1 x worksheet acting as a database of staff details andpay numbers. ["StaffdBaseSheet"] 1 x summary page which shows staff reaming leaveallocation. ["SummaryLeaveSheet"]

What I'm having problems with at the moment is as follows:

A formula or a macro which works out how many days are present in a given month [starting date of month located in CELL B10].

Days 1-27 will be already set up on the sheet. Based upon the monthly value I would like a solution which can calculate how many days are in a month and create a column for days 28, 29, 30 or 31 (depending on the month).

I would like it to work like this:

When the user opens a new worksheet, they first entre the month start date in CELL B10. Hopefully this will trigger columns E13:AH22 to update with the relevant week day & date.

I also need the formulas and formatting in cells AH13:AH100 (column for day 27) to copied over automatically.

I'm stuck on the final piece of my macro project. I've attached a workbook with two sheets: sheet 1 is what I currently have, and sheet 2 is what I'd like my report to look like when complete.

On Sheet 1: - column B is called Supervisor Name - Columns D-O are months of the year, with either a Yes or No in each cell.

I'd like to write a macro that will: - Take all unique values in Supervisor Name column, and paste these Above the current table. - For each Supervisor, and each month, I'd like it to calculate, as a %, the number of Yes mentions in each month divided by the total cells (Yes/(Yes+No)).

Sheet 2 contains the output, in the format I'd like to see it.

Sheet 2: Supervisor Name October November December