Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code that works fine and does what I need it to do. What
I am wondering is if there is a way to improve the code inside the if statement so that the 2 workbooks do not need to be alternately selected. Thus I hope speed up the macro. The bit inside takes a range of 120 cells in one row from "FromWorkbook" then selects "ToWorkbook" and the first cell where the range is to be pasted and then pastes the data. If Workbooks(ToWorkbook).Sheets("LTDIS pay").Cells(j, 1).Value = Workbooks(FromWorkbook).Sheets(1).Cells(i, 3).Value, 2) Then Workbooks(FromWorkbook).Sheets(1).Activate Range(Cells(i, 7), Cells(i, 127)).Copy Workbooks(ToWorkbook).Sheets("LTDIS pay").Activate Cells(j, 2).Select ActiveSheet.Paste End If Many thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Anyone help to improve my code? | Excel Programming | |||
improve DeleteBlankRows() | Excel Programming | |||
Help to improve macro | Excel Programming | |||
Can you help me to improve this macro? | Excel Programming | |||
Please help me improve macro to convert spreadsheet to tabular for | Excel Programming |