+ Reply to Thread
Results 1 to 9 of 9

Change all dates in a specific date range

  1. #1
    Registered User
    Join Date
    03-08-2005
    Posts
    4

    Change all dates in a specific date range

    I have created macros, but only using the record key. I have not used the vb editor. I need help. I have a date column that has over 60k dates. The dates range from 2003 through 2009. I am trying to assign 1 value to a particular date range. if date is between 06/01/2009 and 06/30/2009, then assign the date as 06/01/2009. Therefore my logic is for the macro to copy the month as is, but change the day to 1 and retain the year as is. The reformatted date is being exported into access. I am working on a deadline, I will take all the help that I can get.
    Last edited by akhilash; 07-13-2009 at 10:33 AM. Reason: title change per rule requirement

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help with a Macro

    As per forum rules, please adjust your original post thread title to reflect the specific need. This is the programming forum so "macro" is implied, and "help" doesn't follow the rules.

    Perhaps "Change all dates in a specific date range"

    Then I can give you a few lines of code to take care of it. What column has the dates and what sheetname?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-08-2005
    Posts
    4

    Re: Help with a Macro

    Thanks, the dates are in column AF and the name of the worksheet is Sales Details

  4. #4
    Registered User
    Join Date
    03-08-2005
    Posts
    4

    Re: Help with a Macro

    sorry, will change the title thanks

  5. #5
    Registered User
    Join Date
    03-08-2005
    Posts
    4

    xxxxxxxxxxxxxxxxxxx

    xxxxxxxxffsd

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help with a Macro

    Go to original thread and click EDIT, post #1

  7. #7
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Help with a Macro

    You still need to edit the title.
    Go to your first post, click [Edit], then [Go Advanced], then you should be able to change it.
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Change all dates in a specific date range

    Ok, try this macro:
    Please Login or Register  to view this content.
    Rather than hardcode it to do 6/2009, I made it ask YOU what month you wanted to convert.

  9. #9
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Change all dates in a specific date range

    Hi
    Try the macro in the attached file
    Ravi
    Attached Files Attached Files

+ 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