Dear All,
I've been passed a Macro to delete values after the highest within an array of values in a column. Now I'd like to do a similar operation, but deleting the values preceding the lowest.
The Macro I use for delete after the max is the following:
Many thanks,
marco
I've been passed a Macro to delete values after the highest within an array of values in a column. Now I'd like to do a similar operation, but deleting the values preceding the lowest.
The Macro I use for delete after the max is the following:
VBA Code:
Sub deleteaftermax()
Dim i As Integer
For i = 1 To ActiveSheet.UsedRange.Columns.Count
If WorksheetFunction.Count(Columns(i)) > 0 Then
Range(Columns(i).Find(What:=WorksheetFunction.Max(Columns(i)), LookIn:=xlFormulas, LookAt:=xlWhole).Offset(3), _
Cells(Rows.Count, i).End(xlUp)).Clear
End If
Next
End Sub
Many thanks,
marco
Last edited by a moderator: