Related:
- VBA return found cell value
- Vba case like - Guide
- If cell contains date then return value - Excel Forum
- If cell A1 has text then cell B2 has today's Date ✓ - Excel Forum
- Wow equipment return ✓ - Network Forum
- Vba check if value is in array - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 14, 2009 at 08:52 PM
Sep 14, 2009 at 08:52 PM
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