+ Reply to Thread
Results 1 to 2 of 2

Highlight & copy data from outside Excel

  1. #1
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Highlight & copy data from outside Excel

    I work with a lot of numbers that requires me to input data from a number of different sources and I'd like to be able to cut and paste this data into fields of my worksheet with as little effort, aiming and clicking as possible. Is there some way I can execute some code that will prompt me for the first bit of data, then allow me to highlight data from an external source, like a PDF, a web page, or even another Excel or Word document, and have it pasted into a specific cell in my workbook just by clicking and pressing a key or two, then prompting me for the second bit, and so on?

    For instance, I need to provide about 30 or 40 data points from external sources into Excel. I'd like it if Excel could prompt me for each field and require only a double-click and maybe press an alt-key combination and it would cut and automatically paste the data into the appropriate field then prompt for the next field. I could then go to the source, highlight it, press alt-Z (or something) to copy and paste it in one step, then highlight the next bit, press alt-Z, highlight the next bit, press alt-Z, until I'm done.

    I know that that I can perform these steps individually, but it requires that I highlight, right-click, select cut, toggle back to Excel, then find the proper cell, right-click into a cell, select paste, toggle back to source, highlight, then do it all over and over again....etc. If I could start the code, double-click the data for field 1, then double-click data for field 2, double-click the data for field 3, etc, I'd save a lot of time, a lot of clicking, etc.

    It's a long shot, I know...

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Highlight & copy data from outside Excel

    Hello JimDandy,

    I think it could be done. Hee is how I would set it up. I would have a UserForm with a "Paste" button on it. This UserForm would stay on top of all other windows to allow you easy access to the Paste button. You would have to manually highlight the data and use Ctrl+C to copy the data to the clipboard. Once it has been copied, you would click the Paste button and the macro would transfer the clipboard to the worksheet. Would that work for you?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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