+ Reply to Thread
Results 1 to 9 of 9

Copy cell value to clipboard

  1. #1
    Registered User
    Join Date
    11-08-2009
    Location
    Outer Space
    MS-Off Ver
    Excel 2003
    Posts
    2

    Copy cell value to clipboard

    Hello folks,

    I can't believe I cannot find a solution to this problem somewhere on the Internet, but alas. I want to do something very simple:

    1. Copy to the clipboard the contents of a cell in Excel, formatted as Currency.
    2. Alt-Tab to a web browser
    3. Paste the value WITH NO FORMATTING into an edit control.

    For example, I copy the value 25000 (formatted to look like $25,000 by Excel) to the clipboard, then when I paste it into the browser edit field it appears with the dollar sign, commas, and some spaces thrown in for good measure.

    Is there no way to make Excel copy only the value to the Windows clipboard with no formatting?

    Yes, I know about Paste Special for pasting without the formatting. But I want to paste in an app that knows nothing of Paste Special.

    Thanks in advance
    adj

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    re: Copy cell value to clipboard

    Why do you want to paste this value into the other application?

    Perhaps there's a different approach?

    You mention a web browser, are you trying to get information from the web?

    If you are why not try using a web query (Data>Get External Data...New Web Query...

    Or perhaps you could automate Internet Explorer using VBA.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    re: Copy cell value to clipboard

    Select the cell and run this (to which you can assign a shortcut):
    Please Login or Register  to view this content.
    Then switch to any other application and paste (Ctrl+v).
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    11-08-2009
    Location
    Outer Space
    MS-Off Ver
    Excel 2003
    Posts
    2

    re: Copy cell value to clipboard

    shg,

    Many thanks. Your macro does just what I need. I figured it would involve VBA somehow, but was hoping to get it done without it. Oh, well.

    Norie: Thanks for the reply, but I'm taking bits of data out of Excel and into a web app. So I don't need a web query.

    Regards,
    adj

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Copy cell value to clipboard

    Pah, too clever for me

    F2, shift+home
    Ctrl+c

    Perhaps only comfortable for those who naviagate almost entirely by keyboard

  6. #6
    Registered User
    Join Date
    11-20-2007
    Location
    Menlo Park, CA
    MS-Off Ver
    Office 2019 Pro Plus
    Posts
    33

    Re: Copy cell value to clipboard

    Quote Originally Posted by shg View Post
    Select the cell and run this (to which you can assign a shortcut):
    Please Login or Register  to view this content.
    Then switch to any other application and paste (Ctrl+v).
    I was using this in Office 2010 x64 perfectly. Upgraded to Office 2013 x64. Opened the same spreadsheet, and now when I go to paste, it pastes 2 boxes instead of any text. If I paste into Excel, it pastes 2 boxes with question marks inside them. I checked and made sure the Object Form 2.0 was installed and it is. Do you know if they changed anything? Or what I would need to modify? Thanks for the help!

    Also found this info:
    "When I use this in Excel Office 2013 the data isn't in the clipboard and therefore I can't paste it. This never happened in prior versions.

    Under closer inspection I've found that the string does go to the clipboard but as "System String" but not as "Text" or "Unicode Text".

    BUT... about 10% of the time it acutally works as it should putting the string into the clipboard as "Text"."
    Last edited by ImpetuousRacer; 02-06-2013 at 06:37 PM.

  7. #7
    Registered User
    Join Date
    12-03-2013
    Location
    x
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Copy cell value to clipboard

    shg,

    That's GREAT!

    How would you do it for multiple cells or range?

    Thanks

  8. #8
    Registered User
    Join Date
    03-23-2019
    Location
    New Zealand
    MS-Off Ver
    Microsoft Office Professional Excel 1902 32 bit
    Posts
    1

    Re: Copy cell value to clipboard

    I tried your suggestion, but it places an apostrophe before the text in the cell. It was closer than nothing. I was wanting to past into a "Save As" Filename field via a Macro, and could not get clean cell contents. Initially got nothing, then your suggestion gives me an apostrophe plus everything I wanted

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Copy cell value to clipboard

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original. Please start a new thread - See Forum rule #4

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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