+ Reply to Thread
Results 1 to 12 of 12

How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    Cebu
    MS-Off Ver
    2007
    Posts
    36

    How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

    I've been looking for a method to copy select cells from an Excel 2007 worksheet. I got this link:
    https://support.microsoft.com/en-us/office/copy-visible-cells-only-6e3a1f01-2884-4332-b262-8b814412847e
    ...and followed it. Unfortunately, an issue showed up: when it went into the part of copying the cells I highlighted, I got an error message saying "The command cannot be used on multiple selections".

    Browsed through this forum and came up this thread:
    https://www.excelforum.com/excel-programming-vba-macros/1345272-need-help-getting-macro-to-loop-through-copying-and-pasting-a-range-of-cells.html

    I was interested in a VBA script code made by member, LeoTaxi. Here it is below:

    Please Login or Register  to view this content.

    Questions:

    1) Is there a way to modify LeoTaxi's code that can pop up a dialog box asking me what cell values I want to copy only to clipboard (like for example, "1,2,3,4,5" or "6,7,8") which I can later paste into Notepad?

    2) If modifying that code is not possible, is there any way I can copy only the multiple cells I selected then paste into Notepad?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

    With extra sheet (Help)

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-06-2019
    Location
    Cebu
    MS-Off Ver
    2007
    Posts
    36

    Re: How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

    Wait, what do you mean by "..with extra sheet" here?
    Does that mean I first copy the desired values using the VB script, paste those into a blank Excel worksheet then copy the values from there to paste directly into windows Notepad?

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

    No,

    you make make selection, run macro and done, macro takes care of rest.
    Only there must be a sheet called "Help" in the workbook.

    Kind regards
    Leo

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Question

    Quote Originally Posted by angExcel-entflea View Post
    I want to copy only to clipboard (like for example, "1,2,3,4,5" or "6,7,8") which I can later paste into Notepad?
    Why not extracting those selected rows directly to a text file rather than using the clipboard ?

  6. #6
    Registered User
    Join Date
    08-06-2019
    Location
    Cebu
    MS-Off Ver
    2007
    Posts
    36

    Re: Question

    @Marc L
    Actually, it's not rows that I am interested in - it's the individual cells.

    Like in this image for example, it's only the highlighted cells I want to copy then put into Notepad...
    Image 1 - Attachment 726017

    Once I do that, the values in those cells will show up in Notepad in the same order as they were in the Excel file.
    Image 2 - Attachment 726018

    Unfortunately, in Excel 2007, doing Ctrl+C on those highlighted individual cells will cause a pop-up error message window to show up...
    Image 3 - Attachment 726019

    I was poking around for built-in Excel 2007 functions and other buttons that will give me the result I'm after. I was hoping that some sort of VB script that can be a work-around for that...well..I'm crossing my fingers...

    Worst case scenario - I might just be copying each highlighted cell then pasting those into Notepad. The sample worksheet I attached here is just a part of the data - I'm dealing with a file that's 2,000 rows long with 7 cells per row.
    I admit manually copying the cells I want into Notepad one by one (as I did in Image 2) is gonna drive me nuts, unless there's a way to automate that...

    Otherwise, I might be running around the block out of my apartment and start munching random strangers on the neck out of work-induced madness...

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Same player shoot again ‼ …


    Unclear as per your invalid attachment so read & apply the top page yellow banner …

    Same question again :
    why don't you export directly the 'cells' (as in fact I'm right that are rows ! Whatever … ) to a text file rather than using the clipboard ?!

  8. #8
    Registered User
    Join Date
    08-06-2019
    Location
    Cebu
    MS-Off Ver
    2007
    Posts
    36

    Re: Same player shoot again ‼ …

    @ Marc L
    That's what I've been trying to tell you...

    I did attempt to copy only the multiple cells that I want - pressing "Ctrl" then using my mouse to pick out only the cells I want to put directly into Notepad...

    When I did "Ctrl+C" (control+copy command) as I was done selecting, an error message pops up that says. "That command cannot be used on multiple selections". (See the attached image here: Attachment 726048)

    Believe me, I wanted to do something straight-forward and go over directly to Notepad. I thought about clipboard since I notice that anything that gets selected and copied from a worksheet gets ported over to the clipboard first. I was thinking if I went that route and had some built-in function or VB script on it, it would be easy to paste the info I want right over to Windows Notepad...

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Last chance ?


    So you twice did not understand : no need to use the clipboard to extract Excel data to a text file …

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

    So, come on then, Marc - show us how it's done.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?


    Wanna know first if the final purpose is to create a text file …

  12. #12
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How can I copy multiple select cells in Excel 2007 then paste into Windows Notepad?

    If you test the file i provided in #2 it does what you want
    you get inputbox to give desired cells from selection, has to be seperate with .
    So selection = A2:C6 and in inputbox you give 2.4.7
    this copy cells B2,A3 and A4 to clipboard cause
    B2 = selection 2
    A3 = selection 4
    A4 = selection 7

    think you did not test the file

    Kind regards
    Leo

+ 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. copy paste, excel to form like notepad
    By bobsmith456789 in forum Excel General
    Replies: 1
    Last Post: 01-24-2020, 09:06 PM
  2. Replies: 14
    Last Post: 04-18-2017, 07:07 PM
  3. Replies: 2
    Last Post: 12-08-2016, 06:59 PM
  4. Copy cell in excel and paste in notepad
    By akshat_learningvba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2014, 01:27 AM
  5. [SOLVED] Can I copy and paste formulae out of multiple cells into, say, Notepad?
    By seanspotatobusiness in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2014, 10:44 AM
  6. how to copy selected notepad text and paste it in other notepad with macro
    By Guru232 in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 04-24-2013, 04:43 AM
  7. Replies: 3
    Last Post: 08-09-2012, 04:38 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