+ Reply to Thread
Results 1 to 3 of 3

Excel guru question..

  1. #1
    Bryan S. Slick
    Guest

    Excel guru question..

    I have a table, 4w x 10h.

    I input data into A1-A10 and B1-B10. The data is converted into values
    in C1-C10 and D1-10.

    I need the data in the following format:

    C1,D1 C2,D2 C3,D3 C4,D4 C5,D5 C6,D6 C7,D7 C8,D8 C9,D9 C10,D10

    ....all in one cell and with the commas included.


    I know there's a way to do this, but damn if I can remember it.

    Anyone?


    --
    Bryan S. Slick, onyx_hokie at yahoo dot com

    "Violence is the last refuge of the incompetent."

    (Salvor Hardin in 'Foundation', Isaac Asimov)

  2. #2
    Gord Dibben
    Guest

    Re: Excel guru question..

    You could do it manually, but a macro is much quicker.

    Sub ConCat_Cells()
    Dim x As Range
    Dim y As Range
    Dim z As Range
    Dim w As String
    Dim sbuf As String
    On Error GoTo endit
    w = InputBox("Enter the Type of De-limiter Desired") 'comma or whatever
    Set z = Application.InputBox("Select Destination Cell", _
    "Destination Cell", , , , , , 8)
    Application.SendKeys "+{F8}"
    Set x = Application.InputBox("Select Cells...Contiguous or Non-Contiguous", _
    "Cells Selection", , , , , , 8)
    For Each y In x
    If Len(y.text) > 0 Then sbuf = sbuf & y.text & w
    Next
    z = Left(sbuf, Len(sbuf) - 1)
    Exit Sub
    endit:
    MsgBox "Nothing Selected. Please try again."
    End Sub

    At the point where you are asked to Select Cells, select the range C1:D10


    Gord Dibben MS Excel MVP

    On Sat, 1 Jul 2006 13:37:51 -0400, Bryan S. Slick <[email protected]> wrote:

    >I have a table, 4w x 10h.
    >
    >I input data into A1-A10 and B1-B10. The data is converted into values
    >in C1-C10 and D1-10.
    >
    >I need the data in the following format:
    >
    >C1,D1 C2,D2 C3,D3 C4,D4 C5,D5 C6,D6 C7,D7 C8,D8 C9,D9 C10,D10
    >
    >...all in one cell and with the commas included.
    >
    >
    >I know there's a way to do this, but damn if I can remember it.
    >
    >Anyone?



  3. #3
    Bryan S. Slick
    Guest

    Re: Excel guru question..

    [ Sat, 01 Jul 2006 11:11:46 -0700 ]
    [ | Gord Dibben <gorddibbATshawDOTca> ]
    [ <[email protected]> ]

    :You could do it manually, but a macro is much quicker.
    :
    :Sub ConCat_Cells()
    :Dim x As Range
    :Dim y As Range
    :Dim z As Range
    :Dim w As String
    :Dim sbuf As String
    : On Error GoTo endit
    : w = InputBox("Enter the Type of De-limiter Desired") 'comma or whatever
    : Set z = Application.InputBox("Select Destination Cell", _
    : "Destination Cell", , , , , , 8)
    : Application.SendKeys "+{F8}"
    : Set x = Application.InputBox("Select Cells...Contiguous or Non-Contiguous", _
    : "Cells Selection", , , , , , 8)
    : For Each y In x
    : If Len(y.text) > 0 Then sbuf = sbuf & y.text & w
    : Next
    : z = Left(sbuf, Len(sbuf) - 1)
    : Exit Sub
    :endit:
    : MsgBox "Nothing Selected. Please try again."
    :End Sub
    :
    :At the point where you are asked to Select Cells, select the range C1:D10

    Thanks!

    --
    Bryan S. Slick, onyx_hokie at yahoo dot com

    "Violence is the last refuge of the incompetent."

    (Salvor Hardin in 'Foundation', Isaac Asimov)

+ 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