PDA

View Full Version : Solved: Merging Data from 2 Sheets



rangudu_2008
09-17-2008, 06:56 PM
I'm actually trying to merge data from two different sheets in a workbook to a new sheet in the same workbook.

My scenario is described as below:
There are 9 sheets in my workbook and another sheet which displays a Summary. This Summary sheet gets filled automatically when data gets populated from the 5th sheet till the 9th sheet.
The first 3 sheets need to be filled manually by the user and the processing starts from 4th sheet onwards.

Say there are 1000 records in 1st sheet that have to be mapped with the data 2nd sheet based on the unique values of a particular column in both sheet. I tried using a small Access Database file whose tables are filled with data from these sheet via VBA macros.

However, i was successful in implementing this, but of late i'm getting some mapping errors with most of the data fields in the first 2 sheets that are being mapped missing out when a query is executed on a button click in the 3rd sheet.

What i'm trying to do is nothing but a simple vlookup done via some database coding in VBA since the size of data loaded into the first 3 sheets is somewhat huge. The merged sheet contains a total of 61 columns (11 in the 1st sheet merged with 50 columns in the 2nd).

Since i'm facing problems with the mapping, i'm missing out a lot of data and towards the end of the whole process i need to do random sampling. I've posted a separate thread for implementing this random sampling module (refer my thread named random "Choosing Random Samples").
Towards the end of the whole process (which i began with 1000 records) i would obtain 100 samples.

After analysing this problem i concluded that the no. of columns in the 2nd sheet can be reduced to 26 from 50.

I'm doing this as part of my job and cannot share the data in this forum for confidentiality reasons. However, i'll attach a sample workbook that is used in my next post to this thread without data in it.

Ranga