Hello,
I need to extract values from "row data" to "Sheet1" with macro and "Sheet1" should like "desired format".
So far, I have incomplete codes and I need to have all data I colored in red in "Sheet1".
Thx,
Hello,
I need to extract values from "row data" to "Sheet1" with macro and "Sheet1" should like "desired format".
So far, I have incomplete codes and I need to have all data I colored in red in "Sheet1".
Thx,
Sub test()
Dim a, b, i As Long, ii As Long, iii As Long, n As Long, t As Long
a = Sheets("Row Data").Range("b4").CurrentRegion.Value
ReDim b(1 To UBound(a, 1), 1 To 6)
For i = 3 To UBound(a, 1)
If a(i, 5) <> "" Then
n = n + 1
For ii = 5 To 9
b(n, ii - 4) = a(i, ii)
Next
iii = 1: t = 5
Do While a(i + iii, 5) = ""
If a(i + iii, 11) <> "" Then
t = t + 1
If UBound(b, 2) < t Then ReDim Preserve b(1 To UBound(b, 1), 1 To t)
b(n, t) = "'" & a(i + iii, 11)
End If
iii = iii + 1
If i + iii > UBound(a, 1) Then Exit Do
Loop
iii = i + iii - 2
End If
Next
Sheets("Sheet1").Cells(1).Resize(n, UBound(b, 2)).Value = b
End Sub
![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Hello jindon,
Can you please re-arrange the code for the new attachment? This time, we added "Supplier name" column and changed the place of some other columns.
Thx,
Last edited by yalcinbican; 06-30-2017 at 01:35 AM.
I don't like the way you ask questions.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
Hello jindon,
Macro is not showing full results. I had 7 calculations in the old report and macro returned 4 calculations.
When I run your macro in the new report, out of 67 calculations, macro returned only 10 calculations.
Could you please have a look at it?
Thx,
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks