Combining from and to dates

aproberts1980

New Member
Joined
Jul 14, 2020
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Is there a way to combine two dates from two separate cells to one.

example
FromToFrom-To
01/01/202015/01/202001/01/2020-15/01/2020
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,882
Office Version
  1. 365
Platform
  1. Windows
Sure. Let's say that your two dates are in cells A2 and B2. Then enter this formula in cell C2:
=TEXT(A2,"dd/mm/yyyy") & "-" & TEXT(B2,"dd/mm/yyyy")
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
6,058
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Yes, but they will become text and not functional dates.

=CONCATENATE(A2 &"-"&B2)
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,882
Office Version
  1. 365
Platform
  1. Windows
Yes, but they will become text and not functional dates.

=CONCATENATE(A2 &"-"&B2)
Just note that if the values in A2 and B2 are really date entries, and not text entries, then this will return:
43831-43845
which is the numeric value of the dates (that is how Excel sees them, the number of days since January 0, 1900).
That is why I applied the TEXT function to each value, to get it to show the format you expect.

Alan,
It looks like you also blended both Concatenate actions, i.e. it is typically written:
=A2 & "-" & B2
or
=CONCATENATE(A2,"&",B2)

To use both "CONCATENATE" and "&" in the same formula is redundant and unnecessary.
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
6,058
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Joe,

Senior moments some times overtake me when I work to fast without thinking. Thanks.

Alan
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,882
Office Version
  1. 365
Platform
  1. Windows
Senior moments some times overtake me when I work to fast without thinking. Thanks.
No worries Alan! I have them myself (especially on Monday mornings), but I cannot blame it on my age (not quite there yet).
It feels like I have gotten "dumber" since having kids (I blame it on lack of sleep).
 

Watch MrExcel Video

Forum statistics

Threads
1,122,213
Messages
5,594,868
Members
413,945
Latest member
V51773

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top