rhino4eva
Active Member
- Joined
- Apr 1, 2009
- Messages
- 262
- Office Version
- 2010
- Platform
- Windows
' delete entire row if no data
Dim FoundEnd As Range
With Sheets("Sheet1")
Set FoundEnd = .Columns("d:d").Find(What:=Empty, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not FoundEnd Is Nothing Then
.Range(FoundEnd.Offset(0, -1), FoundEnd.End(xlDown)).EntireRow.ClearContents
End If
End With
i have a macro that searches in column d for any empty well and deletes the entire row.
i now need to take this a little further i need to scan thru column d and remove any rows that are less than 10% of the average value for column d
Dim FoundEnd As Range
With Sheets("Sheet1")
Set FoundEnd = .Columns("d:d").Find(What:=Empty, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not FoundEnd Is Nothing Then
.Range(FoundEnd.Offset(0, -1), FoundEnd.End(xlDown)).EntireRow.ClearContents
End If
End With
i have a macro that searches in column d for any empty well and deletes the entire row.
i now need to take this a little further i need to scan thru column d and remove any rows that are less than 10% of the average value for column d