## Convert date ranges into dates

*Article last updated on March 13, 2018*

In a previous post I created a formula to convert dates into date ranges. Now it is time to create dates from date ranges.

The date ranges are in cells C2:D6. The date list in column A is created by an array formula.

### Convert date ranges into dates

Array formula in A2:

**UPDATE:**

Smaller array formula:

**How to create an array formula**

- Copy above array formula
- Select cell A2
- Click in formula bar

- Paste array formula in formula bar
- Press and hold Ctrl + Shift
- Press Enter
- Release all keys

**How to copy array formula**

- Select cell A2
- Copy cell (Ctrl + c)
- Select cell range A3:A30
- Paste (Ctrl + v)

~~There can´t be overlapping date ranges in column C and D.~~

The new array formula handles overlapping dates!

**Download excel sample file for this tutorial. **

Create-dates-from-date ranges.xls

(Excel 97-2003 Workbook *.xls)

Create-dates-from-date-ranges2.xlsx

(New formula and excel *.xlsx file)

**Functions in this article:**

**IF(**logical_test;[value_if:true];[value_if_false]**)
**Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

**SMALL(**array,k**)** returns the k-th smallest row number in this data set.

**MIN(**number1,[number2]**)**

Returns the smallest number in a set of values. Ignores logical values and text

**ROW(**reference**)** returns the rownumber of a reference

**FREQUENCY**(data_array, bins_array)*
*Calculates how often values occur within a range of values and then returns a vertical array of numbers having one more element than Bins_array

*.*

**TRANSPOSE(**array**)**

Converts a vertical range to a horizontal range, or vice versa.

**OFFSET(**reference,rows,cols, [height],[width]**)**

Returns a reference to a range that is a given number of rows and columns from a given reference

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 […]

The image above demonstrates an array formula in cell E4 that searches for the closest date in column A to the […]

Highlight overlapping date ranges using conditional formatting

The image above demonstrates a conditional formatting formula that colors a record if there is at least one record that […]

Identify overlapping date ranges

The formula in cell F6 returns TRUE if the date range on the same row overlaps another date range in […]

Highlight records based on overlapping date ranges and a condition

adam asks: Hi, I have a situation where I want to count if this value is duplicate and if it […]

Count records between two dates with multiple parameters

Sam asks in this post: Count records between two dates in excel Any chance this would work with multiple parameters. […]

How to sort cells filtered by two dates

Question: I have a list containg dates and values. How do I sort values between two specific dates? Answer: Yellow […]

Plot date ranges in a calendar

The image above demonstrates cells highlighted using a conditional formatting formula based on a table containing date ranges. The calendar […]

Lookup two index columns in excel

Formula in B14: =INDEX(D3:D6, SUMPRODUCT(--(C10=B3:B6), --(C11=C3:C6), ROW(D3:D6)-MIN(ROW(D3:D6))+1)) Alternative array formula #1 in B15: =INDEX(D3:D6, MATCH(C10&"-"&C11, B3:B6&"-"&C3:C6, 0)) Alternative array formula […]

Use MEDIAN function to calculate overlapping ranges

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

### 5 Responses to “Convert date ranges into dates”

### 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

Use the img tag, like this: <img src="Insert pic link here">

**Contact Oscar**

You can contact me through this contact form

Wow this is for the Excel Black belt guys!

Oscar for the benefit of those who aspire to get here someday, could you please explain in brief the logic and what part of the formula is doing what.......

chrisham,

Thanks!!

I will explain this post and all the others as soon as I can. This post is now number one on my update list.

Any ideas why - if I enter 20/7/12 to 30/7/12 the range is expanded from 24/7/12 to 30/7/12 (and does not start at the 20th)?

resolved - not sure what the problem was though