+ Reply to Thread
Results 1 to 2 of 2

transposing and parsing cells

  1. #1
    James
    Guest

    transposing and parsing cells

    Here is my question: I have two cells, side by side on the same row.
    One has an amount in it, the other has a list of names, comma
    delimited. I need to transpose the names so that there is one row per
    name, with the amount next to it (same amount for each row). How can I
    start this going? Thanks much.


  2. #2
    Tim Williams
    Guest

    Re: transposing and parsing cells

    Try this (untested)

    sub tspose()

    dim vAmt, arrNames, rDest as range,x as integer

    vAmt=activesheet.range("A1").value
    arrNames=split(activesheet.range("B1").value,",")

    set rDest=activesheet.range("A3")

    for x=lbound(arrNames) to ubound(arrNames)
    rDest.value=vAmt
    rDest.offset(0,1).value=arrNames(x)
    set rDest=rDest.offset(1,0)
    next x

    end sub


    Tim.

    "James" <[email protected]> wrote in message
    news:[email protected]...
    > Here is my question: I have two cells, side by side on the same row.
    > One has an amount in it, the other has a list of names, comma
    > delimited. I need to transpose the names so that there is one row
    > per
    > name, with the amount next to it (same amount for each row). How can
    > I
    > start this going? Thanks much.
    >




+ 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