+ Reply to Thread
Results 1 to 10 of 10

How to set key for 'Match Destination Formatting'?

  1. #1
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    How to set key for 'Match Destination Formatting'?

    Greetings to all.

    I would like to set a shortcut key stroke for this operation [Paste Options - Match Destination Formatting].

    In detail:
    (i) Copy a web content and paste in Excel
    (ii) After paste, select 'Match Destination Formatting' option (Paste Options). Now we have a clear text content.

    Can we set a shortcut key for this operation, please.

    Or else,
    if I copy-paste, it has to automatically 'Match Destination Formatting' option (without manual operation, it has to automatically make when I copy-paste).

    Screenshot for your reference: Key.png

    Help appreciated in advance.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to set key for 'Match Destination Formatting'?

    This will paste values only (no formatting) in the active cell.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: How to set key for 'Match Destination Formatting'?

    Thanks for your reply AlphaFrog.

    I am a very beginner to this Excel coding. Kindly I request your help on where to paste and how to test, PLEASE.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to set key for 'Match Destination Formatting'?

    • Alt+F11 to open the VBA editor
    • Select Insert\Module from the VBA menu
    • Paste the code from above in the edit window
    • Return to your Excel sheet and Alt+F8 to open the Macros dialog
    • Highlight the Paste_Values macro in the list and select Options to set a shortcut

    Copy your web content
    Select the cell you want to paste to and use the shortcut.

    Video: Copy and Paste Macro Code
    Video: Assign Keyboard Shortcuts to Macros in Excel
    Last edited by AlphaFrog; 07-17-2016 at 02:33 PM.

  5. #5
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: How to set key for 'Match Destination Formatting'?

    Thanks AlphaFrog for your kind assistance.

    Getting this error:
    Run-time error '1004':
    PasteSpecial method of Range class failed.


    I might have missed something, but help please.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to set key for 'Match Destination Formatting'?

    My bad. Replace the previous code with this.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: How to set key for 'Match Destination Formatting'?

    Thanks AlphaFrog.

    Works fine (without format) but pastes completely in a single cell (can't we paste as if how we see the exact copied content [without any formats]).

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to set key for 'Match Destination Formatting'?

    Hi,

    To paste from a web page I believe you require:
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  9. #9
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: How to set key for 'Match Destination Formatting'?

    Thanks xlnitwit. Again getting the same error posted above for your code.

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to set key for 'Match Destination Formatting'?

    You should run the code immediately after copying from the webpage. Do not paste into Excel first.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to set key for 'Match Destination Formatting'?
    By LesliePrabakar in forum Excel General
    Replies: 7
    Last Post: 07-16-2016, 10:16 AM
  2. Match data on source and destination sheet and change value
    By Cammandk in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-25-2014, 03:18 PM
  3. [SOLVED] Default to Match Destination Formatting
    By johnph in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2012, 09:38 AM
  4. Paste to take destination formatting
    By jman0707 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2008, 12:21 PM
  5. Paste to take destination formatting
    By jman0707 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2008, 09:38 AM
  6. [SOLVED] paste options - set default to match destination formatting
    By Amy in forum Excel General
    Replies: 1
    Last Post: 06-20-2006, 02:45 AM
  7. Automatically match destination formatting?
    By Nuttysmallbar in forum Excel General
    Replies: 2
    Last Post: 06-09-2005, 01:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1