+ Reply to Thread
Results 1 to 7 of 7

Chaneg value to Date format within same field A1

  1. #1
    Forum Contributor
    Join Date
    09-01-2008
    Location
    Australia
    Posts
    108

    Chaneg value to Date format within same field A1

    Hi All,
    I have in field A1, value of 20131021 in format general.

    I want to convert this to 21/10/2013 within the same field. (Field A1)

    The only way I know is to do it in another cell, then references it.
    e.g. A2 =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

    But is it possible to use any methods to change the date format within A1 itself?

    Regards.
    Nironto

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Chaneg value to Date format within same field A1

    Maybe this:

    =DATEVALUE(RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4))

    Format cell with the formula to date format.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    09-01-2008
    Location
    Australia
    Posts
    108

    Re: Change value to Date format within same field A1

    Thanks Alkey, Maybe I got your formula wrong. it is no difference to to what I have. ^_^
    A2 =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))
    See attachment

    Regards,
    Nironto
    Attached Files Attached Files

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Chaneg value to Date format within same field A1

    Well, both formulas will convert text date in A1 to real date. Isn't this what you were looking for?

  5. #5
    Forum Contributor
    Join Date
    09-01-2008
    Location
    Australia
    Posts
    108

    Re: Chaneg value to Date format within same field A1

    I need them within the same field. (Field A1). Maybe likely to be a underlying VBA program. Since A1 is also the field you keyed into.
    The fields I can convert them to date otherwise if they are in another field (say A2), but due to requirements that A1 you enter the date in 20131021, it will populate 21/10/2013 via an underlying / hidden vba or formula.

    Regards,
    Nironto

  6. #6
    Registered User
    Join Date
    10-17-2013
    Location
    Hyderabad, AP, India
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Chaneg value to Date format within same field A1

    In VBA you can capture a change event and keep monitoring the new value entered in a cell. Once you have the 8 digits entered, then you can format the value into string and assign to the same cell. Something like:

    Please Login or Register  to view this content.
    - Jaideep

  7. #7
    Forum Contributor
    Join Date
    09-01-2008
    Location
    Australia
    Posts
    108

    Re: Chaneg value to Date format within same field A1

    Thanks Jaideep.This works!

    Regards,
    Nironto

+ 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. conditional format if date in field is within the next 6 months
    By Jason_C in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2017, 02:17 AM
  2. Replies: 1
    Last Post: 04-11-2013, 12:22 AM
  3. Change the date field in ListBox in (mm-dd-yy) for another format (dd-mm-yyy)
    By Francisco Sousa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2013, 10:58 AM
  4. Module to convert field to a date format unsuccessful
    By ready2drum in forum Access Programming / VBA / Macros
    Replies: 9
    Last Post: 05-03-2010, 07:48 AM
  5. How do I format date field in footer?
    By Terry Sharman in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-12-2006, 03:15 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