Results 1 to 6 of 6

Create text from multiple cells/ranges

Threaded View

meherenow9 Create text from multiple... 05-10-2008, 04:36 AM
royUK You need to build your string... 05-10-2008, 06:19 AM
meherenow9 Thanks! Now, what if I... 05-10-2008, 07:35 AM
meherenow9 I tried it precisely as you... 05-10-2008, 08:07 AM
royUK You need a reference set in... 05-10-2008, 09:40 AM
meherenow9 Works beautifully, thanks! 05-10-2008, 01:26 PM
  1. #1
    Registered User
    Join Date
    05-10-2008
    Posts
    18

    Create text from multiple cells/ranges

    I realize the answer for this probably rather simple, but I ask you bare with me as I jump into Excel/VBA programming for the first time...

    I am trying to create a VBA script that will take data from individual cells or a range of cells (ie. A1, B2, C3, D4, E5-E8) and create strings of text that it then copies to the clipboard. For example, let's say the above cell values are:

    A1: 3.14159
    B2: $2.00
    C3: 12
    D4: 5
    E5: Sue
    E6: Tom
    E7: Billy
    E8: Joe

    And I want the text that is copied to the clipboard when I press a button to read:

    "Tom found $2.00. Billy and Sue discovered the value of pi was 3.14159, and Joe found 17 marbles."

    (17 = C3+D4)

    So far, I've found that:

    Sub MyDataCopy()
        Dim MyData As DataObject
        Set MyData = New DataObject
        xxxxxx
        MyData.PutInClipboard
        Exit Sub
    End Sub
    is basically what I need, but I can't seem to figure out the xxxxxx where the string is assigned to MyData.

    Thanks in advance!
    Last edited by VBA Noob; 05-10-2008 at 04:53 AM.

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