Dear Leith Ross,
That is wonderful. I really liked how you approached the logic.
Dear OllyXLS,
I just tried your format option and it also worked great.
Thank you both for responding so quickly. Thread solved and +rep.
EDIT 1: Spoke too soon. I tried the format option again and I am still getting the rounding problem. (Leith Ross' logic is of course, unaffected and therefore still sound)
EDIT 2: For future reference, I amended Leith Ross' code and went with this.
Dim timeTaken As String
If timeB < 59 Then
timeTaken = (timeB Mod 60) & " second(s)"
Else
timeTaken = Round((timeB / 60), 0) & " minute(s) and " & (timeB Mod 60) & " second(s)"
End If
If deleteStr = "" Then
MsgBox "The data tables have been cleaned." & vbCrLf & vbCrLf & _
"Total Time Taken: " & timeTaken, vbInformation, "Log Summary"
Else
MsgBox "The data tables have been cleaned." & vbCrLf & vbCrLf & _
"Respondent answers matching '" & deleteStr & "' have been removed." & vbCrLf & vbCrLf & _
"Total Time Taken: " & timeTaken, vbInformation, "Log Summary"
End If
Bookmarks