Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #110159
| From | Claus Busch <claus_busch@t-online.de> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Assistance in transposing multiple sets of data |
| Date | 2017-08-11 13:36 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <omk4k9$k7d$1@dont-email.me> (permalink) |
| References | <bc0ce361-46e9-4a33-b392-a81c5586443b@googlegroups.com> <omhp3n$pdu$1@dont-email.me> <4902a485-814b-4d8d-87f1-276a896d7337@googlegroups.com> |
Hi Mark,
Am Fri, 11 Aug 2017 04:06:51 -0700 (PDT) schrieb Living the Dream:
> I ran your code and it worked kind of, but I think it did not work in-part because I did not fully express exactly what I was trying to achieve.
>
> Below is a breakdown of just ( week 1 ) what I am attempting to do, the Step spacing remains the same.
try:
Sub TransposeTable()
Dim rng1 As Range
Dim i As Integer, rowsC1 As Integer
Dim Lrow As Long, j As Long
Dim varRows As Variant
varRows = Array(9, 27, 57, 75) 'the start rows of the groups
With Sheets("Sheet1")
Lrow = .Cells(.Rows.Count, "A").End(xlUp).Row
For j = LBound(varRows) To UBound(varRows) 'loop through the rows
For i = 1 To 31 Step 6 'loop through the columns
Set rng1 = .Cells(varRows(j), i).Resize(IIf(Application.IsEven(j), 14, 20), 6)
rowsC1 = rng1.Rows.Count
Sheets("Sheet2").Cells(Rows.Count, "B").End(xlUp)(2) _
.Resize(rowsC1, 6).Value = rng1.Value '
Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp)(2) _
.Resize(rowsC1) = .Cells(varRows(j) - IIf(Application.IsEven(j), 2, 20), i + 1)
Next
Next
End With
End Sub
If the code doesn't work for you send me a mail. Then I send you my
workbook. You can look if the layout differs and modify the steps as
expected.
Regards
Claus B.
--
Windows10
Office 2016
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Assistance in transposing multiple sets of data Living the Dream <noodnutt@gmail.com> - 2017-08-10 05:01 -0700
Re: Assistance in transposing multiple sets of data Claus Busch <claus_busch@t-online.de> - 2017-08-10 16:07 +0200
Re: Assistance in transposing multiple sets of data Living the Dream <noodnutt@gmail.com> - 2017-08-11 04:06 -0700
Re: Assistance in transposing multiple sets of data Claus Busch <claus_busch@t-online.de> - 2017-08-11 13:36 +0200
Re: Assistance in transposing multiple sets of data Living the Dream <noodnutt@gmail.com> - 2017-08-11 05:05 -0700
Re: Assistance in transposing multiple sets of data Living the Dream <noodnutt@gmail.com> - 2017-08-11 05:13 -0700
Re: Assistance in transposing multiple sets of data Claus Busch <claus_busch@t-online.de> - 2017-08-11 14:15 +0200
Re: Assistance in transposing multiple sets of data GS <gs@v.invalid> - 2017-08-11 15:33 -0400
Re: Assistance in transposing multiple sets of data Living the Dream <noodnutt@gmail.com> - 2017-08-29 06:14 -0700
Re: Assistance in transposing multiple sets of data GS <gs@v.invalid> - 2017-08-29 11:11 -0400
Re: Assistance in transposing multiple sets of data Claus Busch <claus_busch@t-online.de> - 2017-08-29 18:29 +0200
Re: Assistance in transposing multiple sets of data GS <gs@v.invalid> - 2017-08-29 15:01 -0400
csiph-web