I need somebody to write an Excel macro that will do the following. In short I am trying to create a matched pair sample.
I have two excel sheets, in one I have a list of firms in Group A, in the second one I have a list of firms in Group B. I need to match each firm in Group A with a similar firm in Group B. It should work like this:
1. Start with first firm in Group A, to go Group B and find firms within the same country & industry & Size (+/- 5%), if multiple firms still exist then use the Age column to find the closest match. Once a matched firm has been found enter 1 (for the next match 2, 3 and so on) in the matched column for the firm in Group A and for the matched firm in Group B.
2. Go to the next firm in Group A and repeat the process, however any firms in Group B that have already been matched with a firm in Group A will not be potential matches.
– When finding a match, if Age variable does not exist for the firm or if there are more than one match based on closeness in age then just randomly pick a firm from the matches.
– Not all firms in Group A will have a match and that is fine.
This should be fairly simple to make for a programmer. I have attached the Excel file with Group A and Group B.
I need the actual macro code so that I can tweak it in case I change my mind about size %.