The problem I have though is that I dont know where in the spreadsheet
the row might appear, except that I know it will be after another
particular. I have set this particular word as a variable but it wont
work:
Dim myR As Range
Set Derivative = Cells.Find("DERIVATIVE LIABILITIES")
Sheets("Portfolio Valuation").Select
Set cash = Cells.Find("CASH")
With Worksheets("Portfolio Valuation")
Set myR = .Range(.Range(cash), .Range(Derivative).End(xlUp)) End
With
myR.AutoFilter Field:=1, Criteria1:="liab"
myR.SpecialCells(xlCellTypeVisible).EntireRow.Copy _
Worksheets("Cash Summary").Range("Derivative").End(xlUp)(2)
myR.EntireRow.Delete
So on the "portfolio valuation" the rows which contain the word "Liab"
which I want to move (to sheets "Cash Summary") will appear after the
word CASH. On the cash summary I want to move these lines to two rows
after the word "Derivative Liabilities.
It doesn't like the line in red.
Also, sorry to ask so many questions: can i adapt this so instead of
moving the lines to another sheet, I can move them to futher down the
sheet, to two cells after the word "Derivative" appears?
Thanks
Caroline
Also, I am a beginner at this stuff, but I haven't been setting
variables using Dim. What does Dim actually do/mean?