## How to calculate the number of weeks between dates

The image above demonstrates a formula that calculates the number of complete weeks between two dates. Column B and column C contains random dates.

Formula in cell D3:

Copy cell D3 and paste to cells below as far as needed.

### Explaining formula in cell D3

This formula works fine if the start is later than the end date, however, you get a minus sign before the number.

If you want to remove the minus sign simply use the ABS function to remove it, the formula then becomes:

=ABS(ROUNDDOWN((C3-B3)/7))

#### Step 1 - Subtract dates

C3-B3

becomes

35067 - 35685 equals 618 days.

#### Step 2 - Divide with 7

There are seven days in a week so we need to divide the result with 7.

(C3-B3)/7

becomes

618/7 equals 88.28571429.

#### Step 3 - Round the number down

The ROUNDDOWN function rounds the number down.

ROUNDDOWN((C3-B3)/7)

becomes

ROUNDDOWN(88.28571429) and returns 88.

Question: I am trying to create an excel spreadsheet that has a date range. Example: Cell A1 1/4/2009-1/10/2009 Cell B1 […]

Find latest date based on a condition

Table of contents Lookup a value and find max date How to enter an array formula Explaining array formula Download […]

Formula for matching a date within a date range

Table of contents Match a date when a date range is entered in a single cell Match a date when […]

Count dates inside a date range

How do I automatically count dates in a specific date range? Array formula in cell D3: =SUM(IF(($A$2:$A$10<$D$2)*($A$2:$A$10>$D$1), 1, 0)) + […]

How to calculate overlapping time ranges

I found an old post that I think is interesting to write about today. Think of two overlapping ranges, it may be dates, […]

Count specific WEEKDAYS between two dates

If you want to count specific weekdays like for example Mondays and Wednesdays you need a more complicated array formula. […]

7 days (weekly) date ranges using a formula

Shannon asks:I need a formula that if I enter a start date in field B1 such as 6/8/11 it will […]

How to calculate the number of years between dates

The image above demonstrates the DATEDIF function calculating the number of complete years between two dates. Column B and column C […]

Question: I have a column "B" with a last name.. I have another columb with a date in it "C"... […]

The image above shows a formula in cell D3 that extracts the latest date in cell range B3:B15. =MAX(B3:B15) The MAX […]

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Paste image link to your comment.

**Contact Oscar**

You can contact me through this contact form