Insert Found Column

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
712
Code:
Set fnd = Range("8:8").Find("WBS", , , xlWhole, , , False, , False)
If Not fnd Is Nothing Then
    Intersect(Range("8:5000"), fnd.EntireColumn).Copy
    Range("B8").PasteSpecial xlPasteValues
    Intersect(Range("8:5000"), fnd.EntireColumn).ClearContents
End If
Hello
The code above is working well. However, how would I modify it so that instead of pasting as values, It would insert values in the Range of B8, which would drive all columns to the right.
Thanks for the help
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
30,474
Office Version
365
Platform
Windows
How about
Code:
Set Fnd = Range("8:8").Find("WBS", , , xlWhole, , , False, , False)
If Not Fnd Is Nothing Then
    Intersect(Range("8:5000"), Fnd.EntireColumn).Copy
    Range("B8").Insert xlToRight
    Intersect(Range("8:5000"), Fnd.EntireColumn).ClearContents
End If
 

Forum statistics

Threads
1,078,338
Messages
5,339,638
Members
399,317
Latest member
mLife

Some videos you may like

This Week's Hot Topics

Top