+ Reply to Thread
Results 1 to 2 of 2

put data in a column into a row

  1. #1
    Registered User
    Join Date
    06-13-2006
    Posts
    76

    put data in a column into a row

    Hi,

    I have a worksheet with a lot of data in column B (rows 12 to 242) and a column J (also rows 12 to 242) where the user can insert numbers.
    I would like to create a copy function to copy the vertical data in column B only when there is a number in column J to a new sheet and put the vertical data from column B into a horizontal row 12 on this new sheet.
    I only don't know how to do this. Can someone help me? Thanks in advance!

  2. #2
    Tom Ogilvy
    Guest

    RE: put data in a column into a row

    Sub TransposeData()
    Dim icol as Long, rng as Range
    Dim cell as Range
    icol = 1
    set rng = Columns(10).specialcells(xlConstants,xlNumbers)
    for each cell in rng
    Worksheets("Sheet2").Cells(12,icol).Value = cell.offset(0,-1).Value
    icol = icol + 1
    Next
    end sub

    --
    Regards,
    Tom Ogilvy


    "leonidas" wrote:

    >
    > Hi,
    >
    > I have a worksheet with a lot of data in column B (rows 12 to 242) and
    > a column J (also rows 12 to 242) where the user can insert numbers.
    > I would like to create a copy function to copy the vertical data in
    > column B only when there is a number in column J to a new sheet and put
    > the vertical data from column B into a horizontal row 12 on this new
    > sheet.
    > I only don't know how to do this. Can someone help me? Thanks in
    > advance!
    >
    >
    > --
    > leonidas
    > ------------------------------------------------------------------------
    > leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
    > View this thread: http://www.excelforum.com/showthread...hreadid=564633
    >
    >


+ 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