| | Post: 642 | Registrato il: 24/06/2015
| Città: CATANIA | Età: 80 | Utente Senior | Excel2019 | | OFFLINE |
|
02/12/2018 12:16 | |
Ciao
In alternativa all'ottimo suggerimento di dodo (una caro saluto) puoi provare con questa macro
Option Explicit
Sub LastDate()
Dim ur As Long, uc As Long, i As Long, j As Long
Dim giorno As Integer, mese As Integer, anno As Integer
ur = Cells(Rows.Count, 1).End(xlUp).Row
uc = Cells(3, Columns.Count).End(xlToLeft).Column
For j = 2 To uc
For i = ur To 4 Step -1
If Cells(i, j) <> "" Then
giorno = Day(Cells(i, 1).Value)
mese = Month(Cells(i, 1).Value)
anno = Year(Cells(i, 1).Value)
anno = anno + 1
Cells(2, j) = Format(giorno & "/" & mese & "/" & anno, "mm/dd/yyyy")
Exit For
End If
Next i
Next j
End Sub
Fai sapere. Ciao,
Mario |
|
|