hi
have this vb code that copies data i want from one to excel sheet to another
here is code
now the code does work to a certain point. it copies it over and this is how it looks when it doesCode:Sub Exporting_Data1() Dim i As Long, LR As Long Application.ScreenUpdating = False On Error Resume Next Set ms = Sheets("Sheet2") With Worksheets("Sheet1") LR = .Cells.Find("*", , , , xlByRows, xlPrevious).Row For i = 1 To LR If IsDate(.Cells(i, 1)) Then .Cells(i, 1).Copy ms.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues End If If Len(.Cells(i, "AD")) And .Cells(i, "AD") = "FUND OWNERSHIP %" Then .Cells(i, "AD").Offset(1).Resize(4).Copy ms.Range("B" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial Transpose:=True End If Next i End With Application.CutCopyMode = 0 Columns(1).NumberFormat = "dd/mm/yyyy" Application.ScreenUpdating = True End Sub
i need it to look like thisCode:DATE NOK/IA1 Monthly Average NOK/IA2 Monthly Average NOK/RA1 Monthly Average NOK/RA 2 Monthly Average 01/11/2012 0.00% 20.71% 76.01% 3.28%
any ideas how i can get it to copy over like thisCode:DATE NOK/IA1 Monthly Average NOK/IA2 Monthly Average NOK/RA1 Monthly Average NOK/RA 2 Monthly Average 01/11/2012 0.00% 20.71% 76.01% 3.28%




Reply With Quote