Related:
- VBA return found cell value
- Vba find - Guide
- Thunderbird return receipt - Guide
- Vba case like - Guide
- How to open vba in excel - Guide
- Vba check if value is in array - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
14 Sep 2009 à 20:52
14 Sep 2009 à 20:52
I wonder whether you can find values between two numbers by using "find" function.
anyhow try this macro
modify the macro to suit you. the relevant number data is in A1 down
The relevant rows are copied in sheet 2
anyhow try this macro
modify the macro to suit you. the relevant number data is in A1 down
The relevant rows are copied in sheet 2
Sub test()
Dim rng As Range, c As Range, dest As Range
With Worksheets("sheet1")
Set rng = Range(.Range("A1"), .Range("A1").End(xlDown))
For Each c In rng
If c >= 70 And c <= 71 Then
c.EntireRow.Copy
Else
GoTo line1
End If
With Worksheets("sheet2")
Set dest = .Cells(Rows.Count, "a").End(xlUp).Offset(1, 0)
dest.PasteSpecial
End With
line1:
Next c
End With
End Sub