View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GTVT06 GTVT06 is offline
external usenet poster
 
Posts: 141
Default Copy and Paste in Macro

On Aug 11, 12:20*pm, AccessNewbie
wrote:
this is perfect. *Thank You. *

Can you tell me if I was searching for 34000 and wanted to delete the entire
row with that how would I change this?



"GTVT06" wrote:
hello, try this


Sub test()
Range("A1").Select
* * Cells.Find(What:="34000", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
* * * * :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
* * * * False, SearchFormat:=False).Activate
* * ActiveCell.Copy ActiveCell.Offset(0, 2)
* * ActiveCell.Font.Bold = True
End Sub- Hide quoted text -


- Show quoted text -


Hello this will delete the row.

Range("A1").Select
Cells.Find(What:="34000", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.EntireRow.Delete