Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default macro to automatically sum a column based on another

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default macro to automatically sum a column based on another

Actually, no. You use Data...Subtotals. Very easy.

Thanks for the input, just the same.

childofthe1980s

"Mark Ivey" wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to automatically paste a pic based on a certain condition balayon Excel Programming 3 May 4th 06 03:11 PM
Can an Excel macro be automatically run based upon data in a cell? chasedan Excel Programming 3 January 10th 06 11:20 PM
automatically send email in excel based on value/macro guru stuff Michael A Excel Programming 2 June 14th 05 09:08 PM
macro to transpose cells in Column B based on unique values in Column A Aaron J. Excel Programming 3 October 8th 04 02:29 PM
Macro to Sort Automatically Based on Contents of Drop-down Box Ashleigh K. Excel Programming 1 August 25th 03 10:05 PM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"