+ Reply to Thread
Results 1 to 6 of 6

Macro to simply copy text from a cell.

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Crivitz, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    4

    Macro to simply copy text from a cell.

    I chart for patients. I've created an Excel workbook that upon entering basic criteria, it will bring the user to a worksheet where that criteria was transformed into a single paragraph, in a single cell.

    All I now need to do is to select that cell, and copy the text. (not the whole cell) -This way I can select the company's program and simply paste what was copied. I've used the macro recorder, and it always wants to paste the whole cell.

    I know this is probably simple, but I've labored on this for days.

    Thank you very much in advance.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Macro to simply copy text from a cell.

    What is there in the cell (besides the Text) that you do not want copied??
    Gary's Student

  3. #3
    Registered User
    Join Date
    01-08-2013
    Location
    Crivitz, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to simply copy text from a cell.

    As I recall it would paste what looked like cell. I just want the text characters. The box I'm pasting it into is a bit larger too, so I want the text to flow normally and not to have sentence breaks as if it was still in a smaller box. Currently to accomplish this I have to select the cell, then go up to the formula bar and copy that text. I just want to create a button that when clicked simply copies the text of the paragraph I have in this cell.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Macro to simply copy text from a cell.

    Then I would Copy normally and PasteSpecialValues

  5. #5
    Registered User
    Join Date
    01-08-2013
    Location
    Crivitz, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to simply copy text from a cell.

    This might work if I were pasting into Excel, but I'm pasting into a medical program called Therap. This program will allow the Windows Paste function but not Excel's PasteSpecialValues option.

    I get Excel to create the paragraph in a cell like I need. It's just weird that I must actually manually copy the text from the Formula Bar, lest I get weird formatting upon pasting it into Therap. There has to be code to only copy the text so I can make this process user-friendly. I have tried the macro recorder, selecting the Formula Bar, copying the text and I couldn't edit the code in a way that would work.

  6. #6
    Registered User
    Join Date
    01-08-2013
    Location
    Crivitz, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to simply copy text from a cell.

    What I actually want is the code for a "Copy" button in Excel. -When I click that button, it copies the text in the cell, not the whole cell. Then I can minimize Excel, maximize Therap and paste the text into Therap's charting box. Therap will allow pasting, but not PasteSpecialValues or anything.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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