Hi all,
I'm a novice VBA/VB programmer.
Basically the below runs when someone clicks a button. The purpose is to check if a reference is inputted, if so then check if its been updated and then put the date today in a different field if it has been updated.
The problem is that eventually there could be 1000s references so I need to loop the code.
I can get the code to loop the same number of times as there is references in column A using a for loop but that only repeats the same code for row 2. I want it to move down a row each time it loops.
Any help would be greatly appriciated.
Karen
chips(0) = ""
chips(1) = "Updated"
chips(2) = "Not updated"
Dim today As Date
today = Now
Dim message As String
message = "Status has not been updated for "
If Range("A2").Value <> chips(0) And Range("D2").Value = chips(1) Then
Range("B2").Select
ActiveCell.Value = today
ElseIf Range("B2").Value <> chips(0) And Range("D2").Value = chips(2) Then
Range("B2").Select
ElseIf Range("A2").Value <> chips(0) And Range("D2").Value <> chips(2) Or Range("B2").Value <> chips(0) And Range("D2").Value <> chips(1) Then
Range("A2").Select
MsgBox message + ActiveCell.Text + "."
End If
Bookmarks