I do not have much experience in VBA so I was wondering if someone can help me with the syntax of the following problem.
Here is an example table I have:
hxxp://imgur.com/Zlwbm.png (first post so I can't post links or images)
I want to have a cell display a warning if more than 1 cells in column B are "yes" AND the cells in column A (within the same rows of those cells in B that are "yes") are different dates.
Nothing needs to happen if the dates are the same and nothing needs to happen if the cells in B are "no"
I think I may have an idea how to do this but I'm not familiar with VBA syntax if someone could help me with this.
[VBA]
Private Sub Worksheet_Change(ByVal Target As Range)
For each cell in column B
If cell.value = "yes" Then
array += cell.address
End If
End For
If count(array) > 1 Then
For each item in array
array2 += adjacent cell in column A
End For
End If
If array2 has unique values AND range("H6").value is null Then
Range("H6").Value = "Warning: message here"
Else If array2 does not have unique AND range("H6").value is not null Then
Range("H6").Value = null
Else If array2 is null Then
Range("H6").Value = null
End If
End Sub
[/VBA]