Sub Macro1()
Cells.Find(What:="price", After:=[A1], LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
rowcopy = ActiveCell.Row
Rows(rowcopy + 1 & ":" & rowcopy + 21).Copy
End Sub
I have all my code but am stuck on this. I have all my points in column A in sheet named "Rates". I need to find the value "Price" and copy the 20 rows below it. Thank you
I've edited this from a recorded macro. Hopefully it should provide you with roughly what you need
Code:Sub Macro1() Cells.Find(What:="price", After:=[A1], LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate rowcopy = ActiveCell.Row Rows(rowcopy + 1 & ":" & rowcopy + 21).Copy End Sub
Sub Macro1()
Cells.Find(What:="price", After:=[A1], LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
rowcopy = ActiveCell.Row
Range("A" & rowcopy + 1 & ":A" & rowcopy + 21).Copy
End Sub
This work but it copies the whole row across I only need the values of the A column 20 rows down
Dim c As Range
Set c = ActiveSheet.Range("A:A").Find("Price", LookIn:=xlValues)
If Not c Is Nothing Then
C.Offset(1, 0).Resize(20, 1).Copy
End If