View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RJB RJB is offline
external usenet poster
 
Posts: 86
Default Extracting Rows of Information Based on Value of One Column

OK, I have absolutely no idea what this means. It looks like you gave me a
macro to compare the seventh column of each row with the cell two above it,
and delete if it doesn't match?

"merjet" wrote:

Sub DeleteRows()
Dim iEnd As Integer
Dim iCt As Integer
Dim ws As Worksheet

Set ws = Sheets("Sheet1")
iEnd = ws.Cells(65536, 7).End(xlUp).Row
For iCt = iEnd To 4 Step -1
If ws.Cells(iCt, 7) < ws.Cells(2, 1) Then
ws.Rows(iCt).Delete
End If
Next iCt
End Sub

Hth,
Merjet