+ Reply to Thread
Results 1 to 6 of 6

Copy cell with MAX date and past in older dates

  1. #1
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Copy cell with MAX date and past in older dates

    I mainly need this for pivot table sales tracking.

    I have part numbers that over the years, the descriptions have changed. Someone might have added a comma or space or whatever. When I put it in a pivot table and pull in "Part" and "Description" in the "Row Labels", the result will display the part number once, and list on separate lines all the different descriptions of that same part number. This causes problems.


    On the data sheet, I'd like the vba code to look for the "max" date for each part number, and copy the description field and change all the older dates of that same part number to match the description of the max date part. Can this be done?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copy cell with MAX date and past in older dates

    Edit: Removed due to I need to learn how to read.
    Attached Files Attached Files
    Last edited by JieJenn; 02-06-2015 at 01:18 PM.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copy cell with MAX date and past in older dates

    Ignored my last post use this one. Didn't notice you were looking for description

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Re: Copy cell with MAX date and past in older dates

    This is very close. It changes all the date values in column E to the max date for each part number.

    I actually need the description in column B to change, not the dates in column E. I want the vba code to only look for the max date in column E for each unique part number and once the "max date" is found, change the descriptions(column B) on all the older dates to match the "max date" description.


    Basically, I want all the part number on the sheet to have the most recent description for that part number. Example, back on 01/01/2014, part "Y" was called "butter", but in 03/01/2014, part "Y" was called "soft butter". I want the vba code to find the most recent name used for that part, "soft butter" and change the description of the 01/01/2014 line to "soft butter" instead of "butter".

    I hope this makes since and thanks for your help on this.

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copy cell with MAX date and past in older dates

    Use the code I posted late. Don't use the file, the macro embedded within the file was incorrect.

  6. #6
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Re: Copy cell with MAX date and past in older dates

    Amazing! This is going to save me so much time.

    Thank you!!

+ 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] Copy row of any cell with date in the past and paste to new sheet
    By jeetamin in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 01-30-2014, 02:07 PM
  2. [SOLVED] Sumproduct + validate dates + color cell if older as specific date.
    By dutchdog in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-05-2012, 10:51 AM
  3. How do I show dates older than present date?
    By Sissyfirst in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. How do I show dates older than present date?
    By Sissyfirst in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] How do I show dates older than present date?
    By Sissyfirst in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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