+ Reply to Thread
Results 1 to 3 of 3

Date format in cell Private Sub Worksheet_Change(ByVal Target As Excel.Range)

  1. #1
    Forum Contributor
    Join Date
    02-22-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    108

    Lightbulb Date format in cell Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    HI

    I have two cells on a sheet where the user should enter a date E14 H14.
    I want to allow the user to type only numbers and it will then convert it to date format.

    Example:

    user enter 150912 then it should change it to 15-Sep-12

    I know you experts can do that please help me with a code?

    Thanks

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Date format in cell Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    Hello Hilton1982,

    Why don't you just format those Cells to Date Format?
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    02-22-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Date format in cell Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    Hi Winon

    Because it gives me different result for instant if i put 150912 it returns 07-Mar-13...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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