Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub foo()
Dim look_rng As Range Dim source_rng As Range Dim target_rng As Range Dim rFound As Range With ActiveSheet Set look_rng = .Range("A1") Set target_rng = .Range("B1") Set source_rng = .Range("C1:C100") End With Set rFound = source_rng.Find( _ What:=look_rng.Value, _ LookIn:=xlValues, _ LookAt:=xlWhole, _ MatchCase:=False) If Not rFound Is Nothing Then rFound.Offset(0, 1).Copy Destination:=target_rng End If End Sub -- Regards, Tom Ogilvy "HEY" wrote in message ... Actually, the more I think about it, it would be nice if nothing got deleted and it was just copied and pasted. How is this done. Thanks again |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cut and Paste Macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro to Paste to specific line, and continue to Paste each time on next row not over | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |