Hello everyone
I have the following wonderful of HSV that enables me to transfer data across rows to columns
Here's the attachment illustrating the expected results
Sub MyReport()
Dim SN, I As Long, J As Long, N As Long
Sheets("Result").Range("A2:E1000").ClearContents
SN = Sheets("Data").Range("H1:AU" & Sheets("Data").Cells(Rows.Count, 8).End(xlUp).Row)
ReDim Arr(UBound(SN) * UBound(SN, 2), 2)
For I = 2 To UBound(SN)
For J = 1 To UBound(SN, 2) Step 2
If SN(I, J) <> "" Then
Arr(N, 0) = SN(I, J)
Arr(N, 1) = SN(I, J + 1)
N = N + 1
End If
Next J
Next I
With Sheets("Result")
.Cells(2, 4).Resize(N, 2) = Arr
End With
End Sub
I can get results in sheets("Result") starting in range("D2")
In Sheets("Result") Columns A & B & C I need to fill the data from Sheets("Data")
The data which will be grabbed related to each row
for example : the data Yasser1 to Yasser7 which is in row 2 related to the date : 01/06/2015 so in the sheets("Result") column A .. Range("A2:A8") is expected to that date
The same with the "Branch Column" data >> will be in range("B2:B8") and "Sort Column" data >> will be in range("C2:C8")
Hope it is clear
Thanks advanced
Bookmarks