Vba macro to copy the data from one sheet to another
Posted on 2012-04-13
I have two files, which have one sheet in each which are relevant for this purpose.
In the sheet in the first file (source file), there is data in either three or four columns (vba to be kept flexible to fix the range). The number of rows of data is in the sheet in the first file is 200k. The macro should look for the last record and then stop at the stage of copying and pasting the date in to the sheet in the second file.
The data in the sheet in the first file should be copied by macro in sets of 20k records (three or four columns and 20k rows) and then copied in to the sheet in the second file. this should be done until the last record from the sheet in the first file is copied into the sheet in the second file.
This macro should be tailorable to other files also. Which mean it should ask for the first file and its sheet name and the range where the data exists and which needs to be copied. the Vba should ask for number rows to be copied at a time. Similarly the macro should ask for the second file the sheet and start of the range where the pasting fo the values should start.
I have ms xl 2007 and xp os.
Request your help in this regard.