|
|
Subject:
Need to add data in one column based on dynamic range in another column (Excel)
Category: Computers > Programming Asked by: skutatoi-ga List Price: $25.00 |
Posted:
09 Aug 2004 23:42 PDT
Expires: 08 Sep 2004 23:42 PDT Question ID: 385741 |
Hi All, Here is the set up of my data: Project: Amount$: A 0 A 1 A 2 --------------- TotalA: 3 --------------- B 3 B 4 --------------- TotalB: 7 --------------- C 5 --------------- TotalC: 5 --------------- Total: 15 Now all of the different project types themselves such as A,B,C are dynamic range sub-sets within the larger Project dynamic range itself because everyday these will change i.e. today there are 3A's, 12B's and 37C's....tomorrow there may be no A's, 14B's and 28C's. Now the problem is that how will i add up their respective totals automatically. Is there someway via VBA/Macro to automatically tie in the project (in one column) with its corresponding amount (in another column) and spit out a total keeping in mind the fact that both columns will be changing daily. Many Thanks. |
|
There is no answer at this time. |
|
Subject:
Re: Need to add data in one column based on dynamic range in another column (Excel)
From: alvain-ga on 10 Aug 2004 08:56 PDT |
Try to arrange your data like below: Column A Column B 1 Project: Amount$: 2 A 0 3 A 1 4 A 2 5 A 3 6 B 3 7 B 4 8 B 2 9 C 5 10 C 3 11 C 1 12 0 13 0 14 0 15 0 16 0 extend your matrix if needed. and remember to set the range accordingly in the following formulas the formula will be as below: Total A =SUMIF(A2:B16,"A",B2:B16) Total B =SUMIF(A2:B16,"B",B2:B16) Total C =SUMIF(A2:B16,"C",B2:B16) Hope this is what you need. |
Subject:
Re: Need to add data in one column based on dynamic range in another column (Excel)
From: dreamboat-ga on 13 Aug 2004 14:43 PDT |
Data-->Subtotals is a very under-used feature. You already show totals in your layout, so I assume this is what you WANT, and not what you HAVE. Sort by column A. Click Data-->Subtotals and choose to sum column B by values in column A. Now, if you mean that your data *really* is laid out the way you show it, and you want to continually add data to it each day, then you will need a macro to find the total rows and delete them, and then run the subtotals. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |