Hi oxco,
Please check this code,
![]()
Option Explicit Sub CopyDeleteMaxVal() Dim maxVal As Double Dim rangeToTest As Range Dim cell As Range Dim i As Integer Set rangeToTest = Worksheets("Sayfa1").Range("Matrix") 'Select the range and name it to "Matrix" maxVal = Worksheets("Sayfa1").Range("A1").Value i = 0 For Each cell In rangeToTest If cell.Value > maxVal Then i = i + 1 maxVal = cell.Value Worksheets("Sayfa2").Range("A" & i).Value = maxVal cell.Delete End If Next cell End Sub
Bookmarks