+ Reply to Thread
Results 1 to 6 of 6

macro that would erase part of data in a cell?

  1. #1
    Registered User
    Join Date
    12-17-2007
    Posts
    3

    macro that would erase part of data in a cell?

    Is there a way to write a macro that would erase some data inside a cell?

    I have a column that contain the following data:

    8/08/2007 08:35:31 AM IST (GMT +05:30)
    10/08/2007 08:40:10 AM IST (GMT +05:30)
    10/08/2007 08:40:10 AM IST (GMT +05:30)
    10/08/2007 08:40:10 AM IST (GMT +05:30)
    15/11/2005 07:17:15 AM IST (GMT +05:30)
    15/11/2005 07:17:15 AM IST (GMT +05:30)
    15/11/2005 07:17:15 AM IST (GMT +05:30)

    And I would like the above data become:

    8/08/2007
    10/08/2007
    10/08/2007
    10/08/2007
    15/11/2005
    15/11/2005
    15/11/2005

    Please help because I have to edit data 1 by 1 everyday, and I have to do that more than 500 times. >.<

    Thank you for your assistance in advance

    Clair

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481
    try to test this on a different workbook
    place your data in column A and run this code
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-17-2007
    Posts
    3
    Oh my god! It work wonders! /love Many thankee thankee!

    I have 1 more question, the data now look like this:

    08/08/07
    08/10/07
    08/10/07
    08/10/07
    15/11/2005
    15/11/2005
    15/11/2005
    15/11/2005
    15/11/2005
    15/11/2005
    15/11/2005
    18/05/2007
    18/05/2007
    18/05/2007
    03/10/07
    03/10/07
    03/10/07
    03/10/07
    18/10/2007
    15/11/2005
    15/11/2005

    How do I get the cell format into DD/MM/YYYY ? I have tried using Format Cell, Date and selected the format that I want. Only part of the data got their format changed. Why is that?

    Many many thanks!

    Clair

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Clair

    Try this amendment to what Dave posted.
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481
    Not sure why, try tagging another code to the end of the original
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-17-2007
    Posts
    3
    /hug

    Thank you guys, both works!!!

    I am actually crying in real life, no longer need toy do the manual deletion daily. T.T


    Clair

+ 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