MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 15th, 2002, 07:20 AM   #1
karam
New Member
 
Join Date: May 2002
Posts: 3
Default

I am looking for a simple way to update a simple calculation each month to pull the current month into an addition calculation.

ex:
J F M A M J J A S O N D (months in the year)

At the end of march I want to add March data to a YTD calculation which already pulls Jan and Feb data.

So instead of doing this manually several times, I would like to put one formula in the YTD column which will be a function of Now().

It seems as though there has to be a way to do this b'c it is such a simple concept.

THANKS!
karam is offline   Reply With Quote
Old May 15th, 2002, 04:44 PM   #2
dimrod
 
Join Date: May 2002
Posts: 73
Default

If your YTD column is column A, and your month headings are in B1:M1, then :-

- make sure the dates in the headings are all the last day of each month (can be formatted as mmm)

- put this formula in A2 and fill down
=SUMIF(B$1:M$1,"<=" &TODAY(),B2:M2)
dimrod is offline   Reply With Quote
Old May 15th, 2002, 05:17 PM   #3
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-05-15 15:44, dimrod wrote:
If your YTD column is column A, and your month headings are in B1:M1, then :-

- make sure the dates in the headings are all the last day of each month (can be formatted as mmm)

- put this formula in A2 and fill down
=SUMIF(B$1:M$1,"<=" &TODAY(),B2:M2)
Hi Karam and dimrod:
thinking along dimrod's lines, the correct formula would be ...

=SUMIF(B1:M1,"<="&MONTH(TODAY()),B2:M2)
provided the entries in B1:M1 are 1,2,3, ... and 12 instead of J F M, ...

Please post back if it works for you ... otherwise explain a little further and let us take it from there.

Regards!


_________________
Yogi Anand
Edit: Deleted inactive web site reference from hard code signature line

[ This Message was edited by: Yogi Anand on 2003-01-19 17:12 ]
Yogi Anand is offline   Reply With Quote
Old May 15th, 2002, 05:33 PM   #4
dimrod
 
Join Date: May 2002
Posts: 73
Default

But don't forget the absolute refs for B1:M1
dimrod is offline   Reply With Quote
Old May 16th, 2002, 07:13 AM   #5
karam
New Member
 
Join Date: May 2002
Posts: 3
Default

Thanks!

This did work. However, after thinking about it. I actually want to be able to type in a month or its corresponding month no. and make the formula a function of that.

I am reporting at the end of a month info for the prior month YTD. So, in May I want the formula to pull all info for Jan - April. I also need to save documents for each month and would not want to use now() or today() because it will be updated all monthly reports for each new month.

Let me know if you have anymore thoughts.
karam is offline   Reply With Quote
Old May 16th, 2002, 07:27 AM   #6
Corticus
Board Regular
 
Corticus's Avatar
 
Join Date: Apr 2002
Location: Sarasota, FL
Posts: 1,539
Default

You could have your macro for generating the report cut and paste the data from the month you specify to a 'current' tab. Then have your report tab lookup its values from only the 'current' tab.

Corticus
Corticus is offline   Reply With Quote
Old May 16th, 2002, 07:45 AM   #7
karam
New Member
 
Join Date: May 2002
Posts: 3
Default

SUMIF(MONTH(B$15:M$15),"<="&MONTH(A1),B16:M16)

This is the formula that I am trying to use but it gives me an error message.

I am formating the dates as such and making the formula a function of MONTH().

January-02 February-02 March-02
karam is offline   Reply With Quote
Old May 17th, 2002, 08:31 AM   #8
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-05-16 06:45, karam wrote:
SUMIF(MONTH(B$15:M$15),"<="&MONTH(A1),B16:M16)

This is the formula that I am trying to use but it gives me an error message.

I am formating the dates as such and making the formula a function of MONTH().

January-02 February-02 March-02
If you are going to have dates input into cells A15, as well as in cells B15:B16, then the following formula works:

=SUMIF(B15:M15,"<="&A15,B16:M16)

Regards!

Yogi Anand is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On

Forum Jump


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes