Help! I need macro to transpose the raw data I have extracted from a Biometrics file into the format I need to compute for work hours.
Please see attached file.
Sheet 1(raw data)
Sheet 2 ( format i want the data to look like)
thanks,
rhoda
Help! I need macro to transpose the raw data I have extracted from a Biometrics file into the format I need to compute for work hours.
Please see attached file.
Sheet 1(raw data)
Sheet 2 ( format i want the data to look like)
thanks,
rhoda
Try this:![]()
Sub tranpose2() Dim arr, dat As Variant Dim r&, x&, y&, z As Long With Sheets("raw_data") arr = .UsedRange.Value r = .UsedRange.Rows.Count End With ReDim dat(1 To r / 2, 1 To 4) For x = 12 To 1650 Step 39 y = 3 + 16 * (x - 12) / 39 dat(y, 1) = arr(x, 4) For z = 5 To 35 Step 2 dat(y + (z - 5) / 2, 2) = arr(x + z, 3) dat(y + (z - 5) / 2, 3) = arr(x + z, 8) dat(y + (z - 5) / 2, 4) = arr(x + z, 11) Next z Next x Sheets("sheet2").Range("b3").Resize(r / 2, 4).Value = dat End Sub
1. Include a sample workbook with an example of the result you want
2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.
Great it works! thanks so much!
You're welcome. Glad I could be helpful![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks