redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,602
- Office Version
- 365
- Platform
- Windows
Hi all
I have the following code given to me that I'd like changed slightly, but need help
The code will search for a matching phrase (in this example "Amazon") through column B and then copy the cell into next row of row Z
Instead of just the text in column C being copied, I'd like C:F copied...
TIA
I have the following code given to me that I'd like changed slightly, but need help
The code will search for a matching phrase (in this example "Amazon") through column B and then copy the cell into next row of row Z
Instead of just the text in column C being copied, I'd like C:F copied...
VBA Code:
Sub New_Sort()
Sheets("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("Statement").Range("B:B").Find(What:="*Amazon*") 'Amazon
While Not mycell Is Nothing
mycell.Offset(0, 1).Copy Range("Z65536").End(xlUp)(2)
mycell.clear
Set mycell = Range("B:B").FindNext
Wend
TIA