Related:
- VBA return found cell value
- If cell contains (multiple text criteria) then return (corresponding text criteria) ✓ - Excel Forum
- If cell contains specific text then return value in another cell vba ✓ - Excel Forum
- Excel if cell contains date then return value ✓ - Office Software Forum
- If cell contains text then return value in another cell ✓ - Excel Forum
- How to enable vba in excel - Guide
2 replies
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
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