|
|||||||||||||||||||||
|
#1
|
|||
|
|||
|
macro to sum monthly $ totals
Hi, I am new to Excel and I want to create a simple macro to show me the total $ for monthly sales. My spreadsheet has ship date in one column and amount in another, I want a macro to give me the total $ by month. Can I write a macro that will ask for the month that I choose and then give me a total for that month?
Then I want to be able to take that monthly total and use that to calculate a running total for the year. I would also like to be able to sort by customer at some time later. There must be a simple way to do this, but like I said I am new to this stuff. |
|
#2
|
|||
|
|||
|
Hi,
There is no need for a macro ... Among all the possibilities : 1. Look at sumif() function press F1 for help and example ... 2. Create a simple pivot table Data PivotTable and follow instructions HTH Carim
|
|
#3
|
|||
|
|||
|
similar to carim's post you probably don't need a macro
i've attached a file with some dummy data to show an option as far as the sorting, do you want a button on your page that sorts by customer or can the user just use data->sort?
__________________
--Mark Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? |
|
#4
|
|||
|
|||
|
Thanks, and one more what if?
Mark, your suggestion and example will help me greatly. But since data is added to our spreadsheet daily, is there a way that I would not have to update the formula with a range of cells? Is there a way to use an @ or * to check the entire column? The sort can be done as you suggest when someone needs it. Thanks much for your help and thanks to Carim...
|
|
#5
|
|||
|
|||
|
making the rows dynamically adjust really ramps up the confusion. cell M6 has an offset formula in it that will adjust the range automatically as you add values to A and B
note that if you add to A and not B you will get an error. all ranges must be the same length i also added a data validation list. when you have cell K6 selected go to data->validation to see exactly what that is. not too confusing then i used a lookup in L (which is hidden) that returns a numerical month so that the formula in M6 works again this really ramps up the confusion, i hope it's not too overwhelming
__________________
--Mark Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? Last edited by MDubbelboer; 11-29-2006 at 01:15 PM. |
![]() |
| Bookmarks |
New topics in F1 Get the most out of Excel Formulas & Functions
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|