Compare Column H and Column I , if the value is more than double to each other then fine and if not then delete the row
I am pasting the result in sheet3 but I want the result in same sheet
Compare Column H and Column I
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Compare Column H and Column I
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Compare Column H and Column I
Here is another variation on Rudi's macro:
Code: Select all
Sub Delete_NotDouble()
Application.ScreenUpdating = False
Range("A1").EntireColumn.Insert
Range("A1").CurrentRegion.Columns(1).FormulaR1C1 = "=RC[9]<=2*RC[8]"
Range("A1").CurrentRegion.AutoFilter Field:=1, Criteria1:="TRUE"
With ActiveSheet.AutoFilter.Range
On Error Resume Next
.Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
On Error GoTo 0
End With
ActiveSheet.AutoFilterMode = False
Range("A1").EntireColumn.Delete
Application.ScreenUpdating = True
End Sub
Best wishes,
Hans
Hans
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Compare Column H and Column I
Thnx HansV Sir for giving ur precious time and great support to this post
Problem Solved
Problem Solved