+ Reply to Thread
Results 1 to 5 of 5

Vba help needed to check date and time entry and correct if wrong

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Vba help needed to check date and time entry and correct if wrong

    I have a worksheet where I am inputting data from one sheet (Sheet2) and it copies the values to another (Sheet1). I need some help to check that the date and time have been inputted correctly and if wrong then change. so if someone entered 0800 then it would change to 08:00

    Example workbook attached

    thanks for looking
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Vba help needed to check date and time entry and correct if wrong

    Try:
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Vba help needed to check date and time entry and correct if wrong

    Double Post

  4. #4
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Vba help needed to check date and time entry and correct if wrong

    Thanks, If someone put 101112 in the date field, could it be formatted to dd / mm / yy? if so, what would the code be?

    thanks again

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Vba help needed to check date and time entry and correct if wrong

    Well - you could do something like this but, depending on which couple was dd or mm, it only works sometime, sort of like the stopped clock is right twice a day

    Please Login or Register  to view this content.
    Oh! Thanks for the rep!

+ 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. [SOLVED] UserForms - Check for Correct User Entry
    By Granite-Granny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2014, 01:53 PM
  2. Userform to check Date/Time format correct before copying to worksheet
    By LoneWolf3574 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2013, 05:14 AM
  3. Excel 2007 : Date entry is wrong
    By Attila in forum Excel General
    Replies: 4
    Last Post: 01-02-2010, 09:47 PM
  4. Correct formula for date based reporting function needed..
    By ajsullivan610 in forum Excel General
    Replies: 0
    Last Post: 09-16-2009, 10:51 AM
  5. [SOLVED] Converting Wrong Time Value to Correct One
    By David Lanrizen in forum Excel General
    Replies: 2
    Last Post: 02-05-2006, 09:40 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