Pete- Thank you for the quick response! Your assumptions are on target, but
unfortunately I've been unable to make it work. Initally I got a syntax
error, but when I (thought!) I corrected that, I got an error I'm not
familiar with:
Connection to type library or object library for remote process has been
lost. Press OK for dialog to remove reference.
I have NO clue what this means, except that I probably didn't "fix" the
syntax correctly. What does this error mean?
Thanks again! Dana
"Pete McCosh" wrote:
> I've made a few assumptions here: raw data is in "Sheet1" and is to be pasted
> into "Sheet2"; raw data starts with titles at A1 and has no blank lines. You
> can probably figure out which variables to change.
>
> Sub Transpose_Report()
>
> Dim iRowIndex As Integer
> Dim iColIndex As Integer
> Dim iPasteRow As Integer
>
> Dim wkSrc As Worksheet
> Dim wkTgt As Worksheet
>
> Set wkSrc = ActiveWorkbook.Sheets("Sheet1")
> Set wkTgt = ActiveWorkbook.Sheets("Sheet2")
> iPasteRow = 2
>
> For iRowIndex = 2 To wkSrc.UsedRange.Rows.Count
> For iColIndex = 3 To WorksheetFunction.CountA(wkSrc.Rows(iRowIndex))
>
> With wkTgt.Rows(iPasteRow)
> .Cells(1).Value = Format(iPasteRow - 1, "000") & " - " &
> wkSrc.Cells(iRowIndex, 1)
> .Cells(2).Value = wkSrc.Cells(iRowIndex, 2)
> .Cells(3).Value = wkSrc.Cells(iRowIndex, iColIndex)
> End With
> iPasteRow = iPasteRow + 1
> Next iColIndex
> Next iRowIndex
>
> End Sub
|