Concatenate

chief.dale

New Member
Joined
Mar 22, 2011
Messages
2
I am using Concatenate to input 2 dates as follows:
in C2 I have =CONCATENATE($H$2," TO ",$I$2)
H2 and I2 are date inputs.

In C2 I get numbers and not dates.
What am I doing wrong??
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I am using Concatenate to input 2 dates as follows:
in C2 I have =CONCATENATE($H$2," TO ",$I$2)
H2 and I2 are date inputs.

In C2 I get numbers and not dates.
What am I doing wrong??
Try it like this...

=IF(COUNT(H2:I2)<2,"",TEXT(H2,"m/d/yyyy")&" To "&TEXT(I2,"m/d/yyyy"))

Change this expression in both places:

m/d/yyyy

To whatever date format you normally use in your location.
 
Upvote 0
Welcome to the board!

Give this a try:

=TEXT($H$2,"M/DD/YYYY")&" TO "&TEXT($I$2,"M/DD/YYYY")

Hope that helps.
 
Upvote 0
P.S.

In C2 I get numbers and not dates.
What am I doing wrong??
You're not doing anything wrong.

In Excel dates are really just numbers formatted to look like dates.

So, when you reference a cell with a date Excel evaluates that cell based on its true value which is the number representing the date.

The numbers are the count of days since a base date. The default base date is Jan 1 1900. Jan 1 1900 has the numeric value of 1. Each successive day the numeric value increases by 1.

So:

Jan 1 1900 = 1
Jan 2 1900 = 2
Jan 3 1900 = 3
Jan 4 1900 = 4
Jan 5 1900 = 5
Feb 10 1995 = 34740
Mar 21 2011 = 40623

You can see the numeric value of a date by changing the cell format to General or Number.

These numeric values are commonly referred to as the date serial numbers.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,707
Members
452,939
Latest member
WCrawford

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
Back
Top