You can do this with a macro. But first let me ask: Why not do it with worksheet functions instead? A macro may be better, depending on your needs, but functions are often simpler, and also they keep the data updated rather than having to renew the match-and-add from time to time. So before we do a VBA program, are you sure you want to do it that way? If so, why?
(Hint: If the answer is "Yes, because I want to learn VBA", that's an acceptable reason.)
|