Hi guys,
Anyone can help solve this problem?
What I need to do is transpose a list of data into its own respective worksheet based on data in column c.
For example if column C data is "Place1" the entire row of data will be copied and transpose into "Place1" worksheet.
The below is the code that i am trying to write.
Problem after execution of macro:
It only adds row2 data into the respective worksheet but skip the rest of the data and add the last row data is added in the wrong data worksheet.
I have also attached an example of my working file.
For Each ce In ps.Range("C2:C" & ps.Cells(Rows.Count, "C").End(xlUp).Row)
For Each ws In ActiveWorkbook.Worksheets
If ce.Value = ws.Name Then
If ws.Range("D1").Value = "" Then
ce.EntireRow.Copy
ws.Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Else
ce.EntireRow.Copy
ws.Range("IV1").End(xlToLeft).Offset(0, 1).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
End If
End If
Next ws
Next ce
Bookmarks