Good afternoon!
I hit another snag on a project to help organized documents. I copied a macro from a video that will look at the value of one cell, select the row, and paste it onto another sheet. However, when I modified it, it only selects the third group, and it always pastes it to row 23 on the other sheet even though I specify it to paste below the last row. Please help!
Here is the way the first sheet is set up:
And here is the code I am using:
The end goal if for the code to find every cell that says "Filed," select the row above and below that cell, delete that group of cells so that the cells shift up, and then paste that info on a new sheet after the last row used. However, because I couldn't figure out the copy/paste part, I haven't added a line that will delete the data from the previous sheet.
Any help would be greatly appreciated!
I hit another snag on a project to help organized documents. I copied a macro from a video that will look at the value of one cell, select the row, and paste it onto another sheet. However, when I modified it, it only selects the third group, and it always pastes it to row 23 on the other sheet even though I specify it to paste below the last row. Please help!
Here is the way the first sheet is set up:
And here is the code I am using:
VBA Code:
Sub FindFiled4()
Dim status As String
Dim finalrow As Integer
Dim f As Integer
status = Range("B2").Value
finalrow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For f = 2 To finalrow
If Cells(f, 2) = status Then
Range(Cells(f, 1), Cells(f, 8)).Offset(-1).Resize(3).Copy
Worksheets("Doc Filed").Range("A" & finalrow).PasteSpecial
End If
Next f
End Sub
The end goal if for the code to find every cell that says "Filed," select the row above and below that cell, delete that group of cells so that the cells shift up, and then paste that info on a new sheet after the last row used. However, because I couldn't figure out the copy/paste part, I haven't added a line that will delete the data from the previous sheet.
Any help would be greatly appreciated!