Question : Transpose Columns Names with Data

Hi Experts

I need to ALSO transpose the column names/headers along side the score values so add the column names to the right of Proficiency, as shown on the transpose table.

Can this be done with the current macro on the db.file

Answer : Transpose Columns Names with Data

just add a field to table Transposed_Data name it ColumnName
then use this codes

Sub transposeT()
Dim rs As DAO.Recordset, rs1 As DAO.Recordset
Dim fldArr(), j As Integer, i As Integer
Set rs = CurrentDb.OpenRecordset("Jobs_Data_List")
Set rs1 = CurrentDb.OpenRecordset("Transposed_Data")
rs.MoveFirst
    For i = 0 To rs.Fields.Count - 1
        ReDim Preserve fldArr(i)
        fldArr(i) = rs.Fields(i).Name
    Next
Do Until rs.EOF
    For j = 4 To UBound(fldArr)
        If rs(fldArr(j)).Value > 0 Then
            With rs1
                .AddNew
                rs1![Job ID] = rs![Job ID]
                rs1![Job Name] = rs![Job Name]
                rs1![Job Group] = rs![Job Group]
                rs1![Job Skillpool Group] = rs![Job Skillpool Group]
                rs1![Proficiency] = rs.Fields(fldArr(j))
                rs1![ColumnName] = rs.Fields(fldArr(j)).Name
                .Update
               
            End With
        End If
    Next
rs.MoveNext
Loop
rs.Close
rs1.Close

End Sub
Random Solutions  
 
programming4us programming4us