Hallo again.
i have a problem and i need your help .Please!
open the sheet, i explain there my problem.
sorry but my eglish is not so good.please forgive me.
Hallo again.
i have a problem and i need your help .Please!
open the sheet, i explain there my problem.
sorry but my eglish is not so good.please forgive me.
Power! is knowledge...............
Will there always only be 8 sheets?
Try
Option Explicit Sub arrange() Dim x, lr, y, k, g As Long k = 2 lr = Cells(Rows.Count, 1).End(xlUp).Row 'last row col A x = (lr - 1) / 8 With Sheet1 For g = 1 To x Do While Cells(k, 1).Value = g For y = 1 To 8 Sheets(y + 1).Range("B" & 10 + g) = Sheet1.Cells(k, 4) Sheets(y + 1).Range("C" & 10 + g) = Sheet1.Cells(k, 5) k = k + 1 Next y Loop Next g End With End Sub
Last edited by maniacb; 09-21-2020 at 06:20 PM. Reason: Corrections to response
See attached
Sub Maybe() Dim c As Range For Each c In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row) Sheets("" & c.Value & "").Cells(Sheets("" & c.Value & "").Rows.Count, 2).End(xlUp).Offset(1).Resize(, 2).Value = c.Offset(, 3).Resize(, 2).Value Next c End Sub
or
Sub VenA() ar = Sheet1.Cells(1).CurrentRegion For j = 2 To UBound(ar) With Sheets(CStr(IIf((j - 1) Mod 8 = 0, 8, (j - 1) Mod 8))) .Cells(Application.Max(11, .Cells(Rows.Count, 2).End(xlUp).Row + 1), 2).Resize(, 2) = Array(ar(j, 4), ar(j, 5)) End With Next j End Sub
Thank you all so much.That was exactly want i needed.THANK YOU
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks