Results 1 to 9 of 9

Transpose Macro

Threaded View

  1. #1
    Registered User
    Join Date
    11-18-2008
    Location
    USA
    Posts
    54

    Transpose Macro

    Hey all,

    I don't know if it is possible to write a macro for this or not.

    The data I have is ordered as follows:

    Name
    Company
    Phone
    Email

    Name
    Company
    Phone

    Name
    Company
    Phone
    Email


    Note: There aren't spaces, it was just hard to read with the it all together.

    The data continues in this manner for just over 1000 people, but randomly throughout the data there are some people who I don't have a phone number or email address.

    I need to have this data organized in the following manner:

    Name, Company, Phone, Email.

    I tried using this script, and it worked except for the fact that I didn't know how to edit it for the cases when there isn't an email address or phone number.


    Sub ChrisMacro()
    Dim rng As Range
    Dim i As Long
    Dim j As Long
    Set rng = Cells(Rows.Count, 1).End(xlUp)
    j = 1
    For i = 1 To rng.Row Step 10
    Cells(j, "B").Resize(1, 5).Value = _
    Application.transpose(Cells(i, "A").Resize(6, 1))
    j = j + 1
    Next
    End Sub

    As I said I am not sure if this is possible, but any help would be greatly appreciated.

    Thanks!
    Last edited by b50; 03-23-2010 at 10:54 AM.

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