I inherited an Excel file and it's macros. Before I make any updates, I'm trying to figure out exactly what the macros are currently doing. Can someone help me understand what is happening in the following section of code? It looks like the macro is taking a look at the values in columns 9 and 10 (which are either dates or nothing), so why does it say if "-"?
[vba]If (col = 11) Then
If OutArray(row, col - 2) = "-" Or OutArray(row, col - 1) = "-" Then
OutArray(row, col) = OutArray(row, col - 2) + 30
ElseIf (Int(DateDiff("d", OutArray(row, col - 2), OutArray(row, col - 1))) > 31) Then
OutArray(row, col) = OutArray(row, col - 1) + 2
Else
OutArray(row, col) = OutArray(row, col - 2) + 30
End If
End If[/vba]
Thanks!