Hello
It will be possible for someone to give me some help with the Macro Fill table.
The result I want is outlined in sheet 2.
thanks
Hello
It will be possible for someone to give me some help with the Macro Fill table.
The result I want is outlined in sheet 2.
thanks
Last edited by Birnen; 08-02-2018 at 04:46 AM.
I think this does what you want.
One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.
As a starter :
PHP Code:
Sub Demo1()
Dim V(), W, R&, C%, F%, L&
With Arkusz2.[B1].CurrentRegion.Rows
With .Item("4:" & .Count)
ReDim V(1 To Application.CountA(.Columns("A:C")), 1 To 5)
W = .Value
End With
End With
For R = 1 To UBound(W)
For C = 1 To 3
If W(R, C) > "" Then
F = C * 4
L = L + 1
V(L, 1) = W(R, C)
V(L, 2) = W(R, F)
V(L, 3) = W(R, F + 1)
V(L, 4) = W(R, F + 2)
V(L, 5) = W(R, F + 3)
End If
Next
Next
With Arkusz1
.UsedRange.Offset(3).ClearContents
.[B4:F4].Resize(L).Value = V
End With
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
PHP Code:
Sub Demo2()
Dim L&, R&, C%, F%
L = 3
Application.ScreenUpdating = False
Arkusz1.UsedRange.Offset(3).ClearContents
With Arkusz2.[B1].CurrentRegion.Rows
For R = 4 To .Count
For C = 1 To 3
If .Cells(R, C).Value2 > "" Then
F = C * 4
L = L + 1
Arkusz1.Cells(L, 2).Resize(, 5).Value2 = Application.Index(.Item(R).Value2, , Array(C, F, F + 1, F + 2, F + 3))
End If
Next
Next
End With
Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Thanks for the rep' !
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks