Avatar of kbay808
kbay808
Flag for United States of America asked on

I need to modify code to special paste “Match Destination Formatting (M)” for data from IE.

The source is from a website that has 4 columns of data.  If I manually right click on a cell and select paste option “Match Destination Formatting (M)”, the data populates in cells A1:D1.  When I use the code all of the data populates in cell A1.  How do I modify the code so that the data populates in cells A1:D1?

Sub Paste_Unformatted()
    If Application.CutCopyMode = xlCopy Then
        Range("A4").PasteSpecial Paste:=xlPasteValues
    Else
        ActiveSheet.Range("A4").Select
        ActiveSheet.PasteSpecial Format:="Text", _
                                 Link:=False, _
                                 DisplayAsIcon:=False
    End If
End Sub

Open in new window

Microsoft ExcelVB Script

Avatar of undefined
Last Comment
kbay808

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rgonzo1971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
kbay808

ASKER
Awesome Thanks!!!  That worked perfect.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy