JackkG
04-06-2015, 01:21 PM
Hi,
I got to take the minimum date value from three date values in a row. The code I'm using is below:
But when one of the three date value is blank it returns just "1/1/1900 12:00:00". Is there any way to check for this to skip the blank values and to take lowest date from the remaining two date values?
dim dateval as Date
dateval=WorksheetFunction.Min(cell.Offset(0, 9).Value, cell.Offset(0, 10).Value, cell.Offset(0, 11).Value)
cell.Offset(0, 3).Value = dateval
I got to take the minimum date value from three date values in a row. The code I'm using is below:
But when one of the three date value is blank it returns just "1/1/1900 12:00:00". Is there any way to check for this to skip the blank values and to take lowest date from the remaining two date values?
dim dateval as Date
dateval=WorksheetFunction.Min(cell.Offset(0, 9).Value, cell.Offset(0, 10).Value, cell.Offset(0, 11).Value)
cell.Offset(0, 3).Value = dateval