+ Reply to Thread
Results 1 to 3 of 3

VBA to Update status Column based on recent date

Hybrid View

edkawy VBA to Update status Column... 04-17-2017, 08:47 AM
TMS Re: VBA to Update status... 04-17-2017, 09:33 AM
edkawy Re: VBA to Update status... 04-17-2017, 10:06 AM
  1. #1
    Registered User
    Join Date
    03-27-2017
    Location
    KSA
    MS-Off Ver
    2010
    Posts
    11

    VBA to Update status Column based on recent date

    Hello , I need your help please

    I have very large database file about 100000 rows and 20 column , sample example as follow


    Column A( Name) Column B( Date) Column C ( Status)
    15600-DP-C-01452 4/10/2017 Superseded
    15600-DP-C-01452 5/11/2017 Current
    15600-DP-C-01452 1/25/2017 Superseded
    15600-DP-C-01452 2/28/2017 Superseded
    15600-DP-C-02345 3/07/2017 Superseded
    15600-DP-C-02345 1/24/2017 Superseded
    15600-DP-C-02345 1/12/2017 Superseded
    15600-DP-C-02345 4/13/2017 Current

    I need to have VBA code to look up the value in Column A and then search for the most recent date in Column B corresponding to this value , and then add the work “ current “ in the adjacent cell for this date and “ superseded” to the old date

    Hope my request is clear
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,596

    Re: VBA to Update status Column based on recent date

    Can the data be sorted into date within name? If it can, then you can just compare the names; when it changes, you have the most recent date.

    Or, failing that, you could use a Date = MAX(IF(...)) type array formula. See: http://blog.contextures.com/archives...x-if-in-excel/

    If you must have a VBA subroutine, you could just post the formula into the first cell, copy it down, and convert the formulae to values.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-27-2017
    Location
    KSA
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA to Update status Column based on recent date

    Hi, thanks a lot for your reply

    Sorry , but really I don’t understand what do you mean by “Can the data be sorted into date within name “

    I don’t want to go for array formula because when I use it in my original file I cant work with it , too much data , so I wish to have VBA code

    I have attached new sample for same structure of my original file and kindly if you can insert VBA code.

    Column A : Document Name
    Column E: Rev. Status
    Column M: Received_Date


    I wish to find the most recent date from column M for the document name from column A and put the word “ Current” into adjacent cell in column E “Rev. Status” .

    Thanks in advance for your help
    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)

Similar Threads

  1. Update Values based on status update
    By JDobbsy1987 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-03-2017, 02:11 PM
  2. VBA to update status based on available data
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2016, 05:30 AM
  3. Update numbers from most recent date
    By dhlawton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-27-2016, 08:20 AM
  4. [SOLVED] Find the most recent date in a column based on a name in a different column
    By Tamarissa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-22-2014, 10:10 AM
  5. Replies: 1
    Last Post: 10-21-2012, 05:03 PM
  6. Replies: 4
    Last Post: 07-06-2012, 03:55 PM
  7. Replies: 4
    Last Post: 04-08-2012, 09:43 PM

Tags for this Thread

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