Copy recent date

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
822
Hi to all in forum, Im kindly require to provide me support sso that a VBA code, should run through col. "A" and where find the newest date should copying this date in cell "A500".

Please see below an extract.

09/06/2019
15/06/2019
21/06/2019

Based on above extract the code should copying the date "21/06/2019"
Thank you all in advance
 
Last edited:

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
3,981
Office Version
365, 2019, 2016
Platform
Windows
try

Code:
Sub Recent_date()
    Range("A500").Value = WorksheetFunction.Max(Range("A1:A499"))
End Sub
 

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
822
Perfect Alan, thank you so much for your time spent for my project. Hv a great day!
 

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
3,981
Office Version
365, 2019, 2016
Platform
Windows
you're welcome
 

Watch MrExcel Video

Forum statistics

Threads
1,102,642
Messages
5,488,071
Members
407,622
Latest member
plantaddict

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top