09-26-2017 12:18 PM
09-26-2017 12:23 PM
It would be a good idea to show us what you've tried so far along with some sample data - people on here are very helpful but they like to see you've actually made an attempt first
09-26-2017 01:13 PM
Firstly that's not a macro
Secondly how are you ensuring only unique values are selected?
Thirdly hopw are you ensuring correct mayching by id?
Fourthly where are your parameters?
If you don't have sample data then create some, run your program to see what happens.......
09-26-2017 01:16 PM
Itemize your requirements.
Break it into steps first.
Then get it working for a non macro situation.
Then convert it into a macro.
Your current attempt is missing several of the criteria in the question .
i won't do your homework but happy to help debug.
09-26-2017 01:23 PM
Macro programming involves determining what you need to do without any macro coding. Then adding the parameters to make the macro more "dynamic" or flexible than the fixed code for one case.
If you don't know how to do the case without a macro then starting with a macro is likely to end in a failure as the macro language basically is intended to write code to perform the process. So if you had the base code that would do one case we could show you where to make the changes suitable for a macro to process different data sets and variables.