Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default losing date format when referencing date cell on another sheet and

I need to reference a date cell in another sheet in my workbook. I select
the cell that needs to display the referenced content. Then in the formula
bar I type = . Then I move to the sheet containing the cell I want to
reference. I select this cell and then click the green checkmark next to the
formula bar. The desired date value now shows up in my display cell in the
correct format. But I need to add text to this cell. Now my display date
loses its format and becomes a plane number.

Here is my reference =Sheet1!B15

Here is what I want to do = "(" & Sheet1!B15 & ")"

I also tried surrounding the reference with $

=Sheet1!$B$15

This did not help. As soon as I add text I get this:
(39752)

Is there a way to retain the date format for what I want to do? How to do
this?

Thanks,
Rich




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default losing date format when referencing date cell on another sheet and

Hi Rich,

Just change the format between the double quotes to whatever format you
desire.

="("&TEXT(Sheet1!B15,"dd/mm/yyyy"&")")


--
Regards,

OssieMac


"Rich" wrote:

I need to reference a date cell in another sheet in my workbook. I select
the cell that needs to display the referenced content. Then in the formula
bar I type = . Then I move to the sheet containing the cell I want to
reference. I select this cell and then click the green checkmark next to the
formula bar. The desired date value now shows up in my display cell in the
correct format. But I need to add text to this cell. Now my display date
loses its format and becomes a plane number.

Here is my reference =Sheet1!B15

Here is what I want to do = "(" & Sheet1!B15 & ")"

I also tried surrounding the reference with $

=Sheet1!$B$15

This did not help. As soon as I add text I get this:
(39752)

Is there a way to retain the date format for what I want to do? How to do
this?

Thanks,
Rich




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default losing date format when referencing date cell on another sheet

Perfect. Thanks.

"OssieMac" wrote:

Hi Rich,

Just change the format between the double quotes to whatever format you
desire.

="("&TEXT(Sheet1!B15,"dd/mm/yyyy"&")")


--
Regards,

OssieMac


"Rich" wrote:

I need to reference a date cell in another sheet in my workbook. I select
the cell that needs to display the referenced content. Then in the formula
bar I type = . Then I move to the sheet containing the cell I want to
reference. I select this cell and then click the green checkmark next to the
formula bar. The desired date value now shows up in my display cell in the
correct format. But I need to add text to this cell. Now my display date
loses its format and becomes a plane number.

Here is my reference =Sheet1!B15

Here is what I want to do = "(" & Sheet1!B15 & ")"

I also tried surrounding the reference with $

=Sheet1!$B$15

This did not help. As soon as I add text I get this:
(39752)

Is there a way to retain the date format for what I want to do? How to do
this?

Thanks,
Rich




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default losing date format when referencing date cell on another sheet

I should have added that you can also use the number format and simply create
your own custom format and that way the cell remains as a date instead of
text.

Use this custom format (dd/mm/yyyy)

Your formula would then be =Sheet1!B15

--
Regards,

OssieMac

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Losing date format when saving .csv files Harley Excel Discussion (Misc queries) 10 December 31st 08 08:46 PM
How can I get date of file creation to XLS cell in date format? Radek Simek Excel Worksheet Functions 3 November 8th 07 04:24 PM
Retaining date formatting in referencing cell Corey Foote Excel Discussion (Misc queries) 2 August 22nd 07 03:34 PM
Concatenating a Text and a Date without losing orginal Date Format Hi_no_Tori Excel Discussion (Misc queries) 5 September 17th 06 06:35 PM
How do I change date format without losing data? ScottNovo New Users to Excel 2 April 15th 05 10:15 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"