macro for sum using combined information from different columns

  • Thread starter Thread starter aapplegate
  • Start date Start date
A

aapplegate

I need to create a macro which allows me to calculate the values from
one column using the criteria from a different column
Column A: will have the name of a person and column B: will have a
number. I need to be able to take all the numbers by each name and
calculate them and then remove duplicate names leaving the total for
each name in a separate column sorted lowest to highest.
 
You've offered your "solution" ... are you open to other ideas?

For example, a Totals query could GroupBy([ColumnA]) and Sum([ColumnB]).

As for removing duplicate names, how can you tell which "duplicate" has the
correct ColumnB value?

Use the Totals query to sort, as well.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Back
Top