+ Reply to Thread
Results 1 to 4 of 4

HUGE table that needs complicated transpose

  1. #1
    Registered User
    Join Date
    05-19-2010
    Location
    Cvl, VA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation HUGE table that needs complicated transpose

    ok, so I'm really screwed here. I have a table that is 23 Columns wide by 1578 Rows tall.
    The column headers are

    Asset Task Resolution 1 Resolutions 2 Resolution 3 etc up to resolution 21
    with data like this
    asset1 task 1 resolution1 resolution2 resolution3 etc up to however many resolutions that task has.
    asset1 task 2 resolution 4 (if task 1 only had 3) resolution 5 etc....

    Each Asset will have multiple rows for each task and each task has multiple columns of resolutions depending on how many resolutions there are.

    I need to get this imported into an online database tool that wants it in this format:

    Asset Task Resolution
    with data from above example showing up like this assuming task 1 had 3 resolutions
    asset1 task1 resolution1
    asset1 task1 resolution2
    asset1 task1 resolution3
    asset1 task2 resolution4
    asset1 task2 resolution5

    Is there some sort of formula or script I could use to get this data translated into this format?

  2. #2
    Registered User
    Join Date
    05-19-2010
    Location
    Cvl, VA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: HUGE table that needs complicated transpose

    any help here?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: HUGE table that needs complicated transpose

    You could help yourself by posting a workbook that shows before and after examples.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    05-19-2010
    Location
    Cvl, VA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: HUGE table that needs complicated transpose

    I actually figured it out... for those who may have a similar problem, here is what I used:

    Option Explicit

    Sub RowFormatColumnData()
    Dim Faults As Range
    Dim LastRw As Long, Rw As Long
    Application.ScreenUpdating = False

    LastRw = Range("A" & Rows.Count).End(xlUp).Row

    For Rw = LastRw To 2 Step -1
    Set Faults = Range(Cells(Rw, "D"), Cells(Rw, Columns.Count).End(xlToLeft))
    If Faults.Cells.Count > 1 Then
    Range("D" & Rw + 1).Resize(Faults.Cells.Count - 1, 1).EntireRow.Insert xlShiftDown
    With Faults.Resize(1, Faults.Cells.Count - 1).Offset(0, 1)
    .Copy
    Range("D" & Rw + 1).PasteSpecial xlPasteAll, Transpose:=True
    .ClearContents
    End With
    End If
    Next Rw

    With Columns("A:C")
    .SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
    .Value = .Value
    End With

    Range("E1", Range("E1").End(xlToRight)).Clear
    Range("D1") = "Resolution"
    Range("A2").Select
    Range("A1").CurrentRegion.Columns.AutoFit
    ActiveWindow.FreezePanes = True
    Application.ScreenUpdating = True
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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