+ Reply to Thread
Results 1 to 11 of 11

Can't figure out pasting array positions in different cells.

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    31

    Can't figure out pasting array positions in different cells.

    Hey folks, this is quickie. I'm simply trying to take the contents of a cell, split it by the first comma, assign each split into an array, then paste each array split into a different cell. So simple but I guess not simple enough for me. I will,l reward 5 Free Interenetz to whoever helps me out!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Can't figure out pasting array positions in different cells.

    Try this

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    07-31-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Can't figure out pasting array positions in different cells.

    Thanks a ton Mike! Worked perfectly. I'll marked as solved but would it be too much to ask for an explanation of the code for future reference?

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Can't figure out pasting array positions in different cells.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-31-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Can't figure out pasting array positions in different cells.

    Thanks for the explanation! So I've got it to copy into two cells in a destination worksheet and I want to substitute all the commas in the second destination cell with pipe characters "|". Below is what I have but it tells me object doesn't support this property or method. Thoughts?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Can't figure out pasting array positions in different cells.

    Can you upload your workbook and the output your wanting?

  7. #7
    Registered User
    Join Date
    07-31-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Can't figure out pasting array positions in different cells.

    Uploaded the attachment(I think).

    After hitting the command button in "split_Test_Source", I want the "split_Test_Dest" workbook to have "TestURL1.com" in cell C2 and the remaining TestURLs in cell D2 with all the commas "," replaced with pipe characters "|"

    Edit: I am using Excel 2003
    Attached Files Attached Files
    Last edited by youngtusk87; 08-15-2012 at 04:47 PM.

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Can't figure out pasting array positions in different cells.

    For what your doing you dont need an Array. Something like this will work better

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-31-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Can't figure out pasting array positions in different cells.

    That works like a charm. The only thing holding me back now is how to loop it so that it executes that code for every row from the source and pastes to the associated row in the destination workbook.

    Edit: I incorporated Mike's latest code into mine so that it copies and pastes correctly from one Workbook to another and attached them.
    Attached Files Attached Files
    Last edited by youngtusk87; 08-15-2012 at 05:30 PM.

  10. #10
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Can't figure out pasting array positions in different cells.

    test this out

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-31-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Can't figure out pasting array positions in different cells.

    Thanks mike! officially solved(For now!)

+ 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