+ Reply to Thread
Results 1 to 2 of 2

easy macro problem

  1. #1
    Registered User
    Join Date
    05-31-2006
    Posts
    2

    easy macro problem

    I'm not an avid user of excel, which will explain the problem I'm having.

    What I want to do:
    Take 1 very long column of data, paste it into a new sheet, and split this one big column into 50 columns of 13 rows each.

    I did this once, using relative cell referencing, and I tried to use the macro and kept getting an error. Whats the problem?

  2. #2
    Bob Phillips
    Guest

    Re: easy macro problem


    iCol = 1
    j=0
    For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
    j = j + 1
    Worksheets("Sheet2").Cells(j, iCol).Value = Cells(i,"A").Value
    If i Mod 13 = 0 Then
    j = 0
    iCol = iCol + 1
    End If
    Next i

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "theintern" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I'm not an avid user of excel, which will explain the problem I'm
    > having.
    >
    > What I want to do:
    > Take 1 very long column of data, paste it into a new sheet, and split
    > this one big column into 50 columns of 13 rows each.
    >
    > I did this once, using relative cell referencing, and I tried to use
    > the macro and kept getting an error. Whats the problem?
    >
    >
    > --
    > theintern
    > ------------------------------------------------------------------------
    > theintern's Profile:

    http://www.excelforum.com/member.php...o&userid=34980
    > View this thread: http://www.excelforum.com/showthread...hreadid=547183
    >




+ 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