redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,604
- Office Version
- 365
- Platform
- Windows
Hi all,
A while back I was given lots of help to write some code that searches though column B of my "Bank Statement" sheet for certain text strings.
If a match is found then the matching string's value in column C is copied into the next available row in a given column...
so for example the above searches for the text string "cash out" then copies that value from column C into next available in column AG, then deletes the copied value from column C
What I want to do is change the paste function so that it copies the found value (column C) and then places it instead of the next available cell in column AG but the next available cell in ROW25
any ideas please?
A while back I was given lots of help to write some code that searches though column B of my "Bank Statement" sheet for certain text strings.
If a match is found then the matching string's value in column C is copied into the next available row in a given column...
Code:
Sub Sort()
Sheets("Bank Statement").Select
Range("C:C").Select
Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("E1").Select
Set myCell = Sheets("Bank Statement").Range("B:B").Find(What:="*cash out*") ' Cash Withdrawals
While Not myCell Is Nothing
myCell.Offset(0, 1).Copy Range("AG65536").End(xlUp)(2)
myCell.clear
Set myCell = Range("B:B").FindNext
Wend
What I want to do is change the paste function so that it copies the found value (column C) and then places it instead of the next available cell in column AG but the next available cell in ROW25
any ideas please?