Hi there,
I'm calculating the standard deviation of deceleration of a vehicle. I do this by filtering out cells with positive acceleration. However sometimes there is no deceleration in that range of cells, so no cells can be found and the macro stops. How can I make it return "No deceleration" and continue on? Or even just the error #DIV/0! and continue on?
Thank you
I'm calculating the standard deviation of deceleration of a vehicle. I do this by filtering out cells with positive acceleration. However sometimes there is no deceleration in that range of cells, so no cells can be found and the macro stops. How can I make it return "No deceleration" and continue on? Or even just the error #DIV/0! and continue on?
Thank you
Code:
'Standard deviation Deccceleration
Worksheets("raw").Select
With ActiveSheet
.AutoFilterMode = False
.Range("a1:j1").AutoFilter
.Range("a1:j1").AutoFilter field:=7, Criteria1:="<0" 'only display cases of deacc
End With
StandardDevDeacc = Application.StDev(Worksheets("raw").Range(Cells(sp, 7), Cells(ep, 7)).SpecialCells(xlCellTypeVisible))
Worksheets("kinematic").Activate
ActiveCell.Offset(0, 17).Value = StandardDevDeacc
Last edited: