Results 1 to 12 of 12

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

Threaded View

  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:

    Sub test()
    Dim arr As Variant, sn As Variant, x As Long, lr As Long
    arr = Sheets("Organized Data").Range("A2", "I13")
    With Sheets("Sheet2")
        lr = .Range("A" & .Rows.Count).End(xlUp).Row
        sn = .Range("A2", "A" & lr)
        For x = 1 To UBound(sn)
            Sheets("Organized Data").Range("A" & Rows.Count).End(xlUp).Offset(1).Resize(UBound(arr), UBound(arr, 2)) = arr
            Sheets("Organized Data").Range("A" & Rows.Count).End(xlUp).Offset(1) = sn(x, 1)
        Next
    End With
    End Sub

    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

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