View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mark Ivey[_2_] Mark Ivey[_2_] is offline
external usenet poster
 
Posts: 171
Default macro to automatically sum a column based on another

You might be able to use the SUMIF worksheet function in your code to
accomplish that task...

Mark

"childofthe1980s" wrote in
message ...
Hello:

I have a spreadsheet that, among other columns, has an inventory item
column
and a quantity column.

The inventory item column has several records with item A, item B, item C,
etc. The number of items column has several records also with 8 for A in
one
record, 2 for A in another record, 3 for A in another record, 4 for B in
another record, 5 for B in another record, 9 for C in another record, 7
for C
in another record, etc.

I want to create a macro that automatically sums the quantity of each item
A, B, and C. I'm not concerned with a total quantity for the entire
spreadsheet--just a total for each item.

How do I program Excel to have such a macro? I'm sure that the solution
is
simple. I'm just not familiar with creating Excel macros.

Thanks!

childofthe1980s