+ Reply to Thread
Results 1 to 4 of 4

Text formatted as date

Hybrid View

  1. #1
    Registered User
    Join Date
    04-03-2010
    Location
    Orlando, FL
    MS-Off Ver
    Office 365
    Posts
    94

    Text formatted as date

    Hello,

    I have a spreadsheet which contains a user form, and in the form there is some code to transfer data to a worksheet. The text looks like a fraction, but is actually text (actual text, 1/1, 1/2, 1/5, 1/10). After the data transfer is complete, the entered data for 1/1 is January 1 2015, the data for 1/5 is January 5 2015. The code used to move the data is:
    ws2.Cells(3, 1).Value = Format(ws.Cells(lRow, 24).Value, "@")
    How can I force this to stay in the text format?

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Text formatted as date

    Have you tried to format the cell(s) as text?
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    04-03-2010
    Location
    Orlando, FL
    MS-Off Ver
    Office 365
    Posts
    94

    Re: Text formatted as date

    Hello,

    The cells are formatted as text.

  4. #4
    Forum Contributor
    Join Date
    05-27-2014
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    2007 & 2010
    Posts
    273

    Re: Text formatted as date

    You could force the result by adding an apostrophe between two quotes before the value you really want like this:
    ws2.Cells(3, 1).Value = "'" & ws.Cells(lRow, 24).Value
    Last edited by kadeo; 08-31-2015 at 02:56 PM.
    Please click *Add Reputation if I've helped

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formulae to change text formatted date to number format
    By shekar goud in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-11-2010, 01:57 PM
  2. How to display formatted date as wrapped text
    By htroberts in forum Excel General
    Replies: 1
    Last Post: 01-04-2010, 06:22 PM
  3. Text from Date formatted column
    By kawhite in forum Excel General
    Replies: 3
    Last Post: 12-12-2007, 12:41 PM
  4. date formatted in text
    By Clash in forum Excel General
    Replies: 3
    Last Post: 06-30-2007, 05:06 PM
  5. Date formatted in text and age problem
    By monk101 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2007, 12:07 PM
  6. Combining Text and a Formatted Date into a Single Entity
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 03:33 AM
  7. [SOLVED] Converting 'General' formatted cells to Text formatted cell using.
    By Zahid Khan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1