Hi Everyone,
I am trying to copy one worksheets contents to another worksheet cell by cell & a row at a time. This is because not all the fields need to be copied across & the data within some columns needs to be reformatted to fit correctly in the new worksheet.
I have created VBA which does this but it takes forever to run as it switches through 3 worksheets & copies each cell one at a time.
Is there anyway to improve the speed? the code is shown below.
Any help would be grreatly appreciated & thanks in advance.
Shuja
What the following code does is take the active data cell within the 'DATA' worksheet (selected using the For..Next loop) and find the Field name title at the top of the column. It then looks at a worksheet (FIELDNAMES which has a list of field names from worksheet 'data' and the equivalent fieldnames for the 'TEMPLATE' Worksheet (where i want data copied to). The code then takes the field name equivalent for the 'Template' worksheet & selects the column name in the worksheet. with the row value attained from the 'DATA' worksheet, the code then copies the contents od the 'DATA' worksheet activecell into the 'TEMPLATES' worksheet activecell.
This seems to work but i want to improve it's speed & performance.
Bookmarks