Hello everyone,
I have the following problem, that I don't know how to solve with Excel VBA (but which is easily solvable in R with the merge function, if that may help you understand my problem).
THE SETUP:
I have a workbook that contains a number of sheets.
On each sheet there are four columns, the first row of each column is the name. The column placements and column names are similar across the sheets.
The first column (Comp_Name) contains company names.
The second column (Date) contains the dates. The dates are in format like 21.12.2007
The third column (Return) contains returns for each company on that specific date.
PROBLEM:
Some companies (together with same dates and returns) appear on several sheets.
I am copying all the data from each of the sheets into one worksheet in another workbook. The data I have copied is used in formulas in that workbook. Having redundancies is not an option.
WHAT I WANT TO DO:
I want to merge the sheets by name and date into one big array (on a separate sheet), so that I do not have repeating companies, but still have informational efficiency. In R it is very simple to do, one merges two arrays, then one merges the newly merged array with another array, and so on.
Is it possible to merge arrays in Excel?
Hopefully someone had this kind of problem and can provide me with the clues, or even a piece of code.
Thanks in advance!