ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Question using dates in a statement (https://www.excelbanter.com/excel-discussion-misc-queries/124469-question-using-dates-statement.html)

Wink20TCU

Question using dates in a statement
 
I am currently trying to write a statement that uses two dates from another
worksheet (same workbook) as a title for the first worksheet. However, when
I insert the cells into the statement, the date values do not appear.

My statement looks like:
="Date Range: " & DataRange!A2 & " to " & DataRange!B2

The output looks like:
Date Range: 39075 to 39081

Is there a way to convert the numeric values into dates in this statement?
Thanks.

Gary''s Student

Question using dates in a statement
 
Use the TEXT() function to format the dates.
--
Gary's Student


"Wink20TCU" wrote:

I am currently trying to write a statement that uses two dates from another
worksheet (same workbook) as a title for the first worksheet. However, when
I insert the cells into the statement, the date values do not appear.

My statement looks like:
="Date Range: " & DataRange!A2 & " to " & DataRange!B2

The output looks like:
Date Range: 39075 to 39081

Is there a way to convert the numeric values into dates in this statement?
Thanks.


Dave Peterson

Question using dates in a statement
 
="Date Range: " & text(datarange!a2,"mm/dd/yyyy") & ....

Use the format you like.



Wink20TCU wrote:

I am currently trying to write a statement that uses two dates from another
worksheet (same workbook) as a title for the first worksheet. However, when
I insert the cells into the statement, the date values do not appear.

My statement looks like:
="Date Range: " & DataRange!A2 & " to " & DataRange!B2

The output looks like:
Date Range: 39075 to 39081

Is there a way to convert the numeric values into dates in this statement?
Thanks.


--

Dave Peterson


All times are GMT +1. The time now is 01:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com