+ Reply to Thread
Results 1 to 2 of 2

Arrange Data Headers into rows

Hybrid View

  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    98

    Arrange Data Headers into rows

    I have a big list of data which is identical to the example below.

    I want the headers to appear next to each entry as in the "after" sheet in the example below

    The header always contains a time with a ":" which can hopefully be used to create some kind of loop.

    Ive had a go at this myself but am unfamiliar with loops sorry.

    Arrange data example1.xlsx

    Ive had a go at this myself but am unfamiliar with loops sorry.

    Thanks

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Arrange Data Headers into rows

    Sub a()
    LR = Cells(Rows.Count, "A").End(xlUp).Row
    For j = 1 To LR
      If Left(Cells(j, 1).Text, 3) = "THE" Then
        park = Cells(j, 1).Text
        Cells(j, 1).Value = ""
      Else
        If Left(Cells(j, 1).Text, 3) <> "pre" Then
           Cells(j, 4).Value = park
        End If
      End If
    Next
    End Sub
    If solved remember to mark Thread as solved

+ 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