Ver Mensaje Individual
  #6 (permalink)  
Antiguo 15/04/2008, 12:48
Avatar de judoka
judoka
 
Fecha de Ingreso: enero-2004
Ubicación: viña del mar
Mensajes: 180
Antigüedad: 20 años, 3 meses
Puntos: 3
Re: comparar fechas

perdón en el post anterior se me olvido pegar la macro

Sub Macro1()
dim filas as double
dim fecha as date
dim i as double
Range("D5").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
filas = ActiveCell.Row - 1
For i = 5 To filas
fecha = Cells(i, 4).Value
If (Date - fecha) > 30 Then
Cells(i, 4).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
Next

End Sub
__________________
hay tres tipos de matemáticos, los que saben contar y los que no.
Oscar