date in cell if don't change

  • Thread starter Thread starter Pawn
  • Start date Start date
P

Pawn

Hello from italy,

so sorry for my bad english :)



Please help me with this :



I have in column G , some value like this :



01/03/2005

Rita

Timbrature

Cristina

Paolo

Timbrature

Timbrature

Timbrature

Timbrature

DAL

02/03/2005

Timbrature

Timbrature

Maurizio

Timbrature

Timbrature

Timbrature


what I want in the column B ?

I want the value of date since the change value in the column !

so example of column G, the B will be :

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

01/03/2005

02/03/2005

02/03/2005

02/03/2005

02/03/2005

02/03/2005

02/03/2005



TIA
 
Here is some code to do it

Sub Test()
Dim cLastRow As Long
Dim nDate
Dim i As Long
Dim j As Long

cLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To cLastRow
If IsDate(Cells(i, "A").Value) Then
nDate = Cells(i, "A").Value
End If
Cells(i, "B").Value = nDate
Next i

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top