ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Limelight Media - ExcelTip.com Books > F1 Get the most out of Excel Formulas & Functions

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-29-2006, 10:26 AM
lakers55 lakers55 is offline
Registered User
 
Join Date: 29 Nov 2006
Posts: 2
lakers55 is on a distinguished road
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.
Reply With Quote
  #2  
Old 11-29-2006, 11:22 AM
Carim Carim is offline
Forum Guru
 
Join Date: 07 Apr 2006
Posts: 4,001
Carim is on a distinguished road
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
Reply With Quote
  #3  
Old 11-29-2006, 11:42 AM
MDubbelboer MDubbelboer is offline
Valued Forum Contributor
 
Join Date: 13 Jul 2006
Posts: 400
MDubbelboer is on a distinguished road
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?
Attached Files
File Type: zip book1.zip (5.3 KB, 81 views)
__________________
--Mark

Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
Reply With Quote
  #4  
Old 11-29-2006, 12:44 PM
lakers55 lakers55 is offline
Registered User
 
Join Date: 29 Nov 2006
Posts: 2
lakers55 is on a distinguished road
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...
Reply With Quote
  #5  
Old 11-29-2006, 01:11 PM
MDubbelboer MDubbelboer is offline
Valued Forum Contributor
 
Join Date: 13 Jul 2006
Posts: 400
MDubbelboer is on a distinguished road
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
Attached Files
File Type: zip book1.zip (5.9 KB, 83 views)
__________________
--Mark

Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?

Last edited by MDubbelboer; 11-29-2006 at 01:15 PM.
Reply With Quote
Reply

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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


All times are GMT -4. The time now is 05:45 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0