Data Validation and Macros
Sorry my bad, please look at this:
"Brian T" wrote:
Here is the code I have to move the dates and ratings. Recording and
inserting that code didn't work for me.
Sub Move_Date()
'Moves current inspection date and ratings
'to previous inspection date and rating columns
'Class 1
Dim NewInsp_1 As Range
Dim NewRating_1 As Range
Dim NewSent_1 As Range
Dim myCell_1a As Range
Dim myCell_1b As Range
Dim myCell_1c As Range
Set NewInsp_1 = Range("Current_Date1")
Set NewRating_1 = Range("Current_Rating1")
Set NewSent_1 = Range("Current_Report1")
For Each myCell_1a In NewInsp_1.Cells
If myCell_1a.Value < "" Then
myCell_1a.Copy myCell_1a.Offset(, -2)
myCell_1a.ClearContents
End If
Next myCell_1a
For Each myCell_1b In NewRating_1.Cells
If myCell_1b.Value < "" Then
myCell_1b.Copy myCell_1b.Offset(, -3)
myCell_1b.ClearContents
End If
Next myCell_1b
For Each myCell_1c In NewSent_1.Cells
If myCell_1c.Value < "" Then
myCell_1c.ClearContents
End If
Next myCell_1c
end sub
"Dave Peterson" wrote:
Record a macro when you reapply the data|validation rules????
Brian T wrote:
I have a spreadsheet that tracks inspection dates and ratings. I have macro
that moves the current dates and ratings to the prior year at the end of the
inspection season. The ratings are picked from a validation list, but the
validation is lost. Is there a way to recreate the validation within the
macro?
--
Dave Peterson
|