StefanRSA
New Member
- Joined
- May 26, 2008
- Messages
- 24
Hi Guys,
I am trying to make the below code snippet work to return a date if all arguments are positive. Unfortunately, instead of returning the date, this function returns "". Is there something small I have missed out here?
Should I rather use .FormulaR1C1 = "=TODAY()"? Or is this because I have tried to do the Date function within a WITH statement.Interior?
'If rejected and resolved return todays date
If Left(Cells(ifindrow, iColNum(8) - 1).Value, 3) = "Rej" And Cells(ifindrow, iColNum(8)).Value = "Yes" Then
With Cells(ifindrow, iColNum(8) + 1).Interior
.ColorIndex = xlNone
.Value = Date
End With
End If
Many thanks for your consideration.
Kind Regards,
Stefan
I am trying to make the below code snippet work to return a date if all arguments are positive. Unfortunately, instead of returning the date, this function returns "". Is there something small I have missed out here?
Should I rather use .FormulaR1C1 = "=TODAY()"? Or is this because I have tried to do the Date function within a WITH statement.Interior?
'If rejected and resolved return todays date
If Left(Cells(ifindrow, iColNum(8) - 1).Value, 3) = "Rej" And Cells(ifindrow, iColNum(8)).Value = "Yes" Then
With Cells(ifindrow, iColNum(8) + 1).Interior
.ColorIndex = xlNone
.Value = Date
End With
End If
Many thanks for your consideration.
Kind Regards,
Stefan