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 Apr 6th, 2002, 07:49 PM   #1
crm13
 
Join Date: Apr 2002
Posts: 6
Default

There must be a simple solution. I have daily data and want to extract one value per week to have weekly data. Similarly with monthly.
crm13 is offline   Reply With Quote
Old Apr 6th, 2002, 07:55 PM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,551
Default

What kind of data?

What kind of value do you want to compute/extract/retrieve? An average, a sum, a max,...
Aladin Akyurek is offline   Reply With Quote
Old Apr 7th, 2002, 12:30 AM   #3
crm13
 
Join Date: Apr 2002
Posts: 6
Default

prices of commodities, stocks, etc: raw data
crm13 is offline   Reply With Quote
Old Apr 7th, 2002, 09:21 AM   #4
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

you may need to be a bit more specific - post some examples of the data you are working with together with which ranges they are located and what type of results you want and where you want them....

there's 7 days in a week : how do you want a weekly figure produced ?

there's 30ish days in a month : how do you want a monthly figure produced ?

some concrete examples would enable us to get started on helping...
Chris Davison is offline   Reply With Quote
Old Apr 7th, 2002, 10:17 PM   #5
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
Default

Quote:
On 2002-04-06 13:49, crm13 wrote:
There must be a simple solution. I have daily data and want to extract one value per week to have weekly data. Similarly with monthly.
Suppose this is your data...

*
DateQty
4/1/0210
4/3/0225
4/8/0240
4/18/0255

*

You could create a PivotTable like this...

*
Sum of Qty
DateTotal
3/31/02 - 4/6/0235
4/7/02 - 4/13/0240
4/14/02 - 4/20/0255
Grand Total130

*

...which was created by Grouping 'Date' by Days using 12/30/2001 as the Start date, 1/4/2003 as the End date, and 7 as the Number of days in each interval.

[ This Message was edited by: Mark W. on 2002-04-07 16:26 ]
Mark W. is offline   Reply With Quote
Old Apr 8th, 2002, 12:58 PM   #6
crm13
 
Join Date: Apr 2002
Posts: 6
Default

I didn't make myself clear. I have time series data with differing frequencies I want to transform to a common interval. Say daily data:

3/4/02 1200
3/5/02 1234
3/6/02 1198
3/7/02 1239
3/8/02 1176

I just want the end of week (month) value that I can then combine with other data. Similarly to get annual data from monthly time series, etc. Data is extracted and then compiled to a new file for further analysis. Thanks.
crm13 is offline   Reply With Quote
Old Apr 8th, 2002, 02:09 PM   #7
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
Default

Quote:
On 2002-04-08 06:58, crm13 wrote:
I didn't make myself clear. I have time series data with differing frequencies I want to transform to a common interval. Say daily data:

3/4/02 1200
3/5/02 1234
3/6/02 1198
3/7/02 1239
3/8/02 1176

I just want the end of week (month) value that I can then combine with other data. Similarly to get annual data from monthly time series, etc. Data is extracted and then compiled to a new file for further analysis. Thanks.
You still haven't made yourself clear. Provide both sample data and desired results.
Mark W. is offline   Reply With Quote
Old Apr 11th, 2002, 07:07 PM   #8
crm13
 
Join Date: Apr 2002
Posts: 6
Default

I have time series data, say daily with one data point each day

3/4/02 56
3/5/02 58
3/6/02 67
3/7/02 54
3/8/02 55
....hundreds of daily data points. An array with data and one variable.

Say 3/8/02 is Friday, I want only "3/8/02 55"
but I want to extract this weekly data from the time series of daily points without using a brute force method.

Same if monthly data and I want quarterly or annual.

No manipulation of data at this point.
crm13 is offline   Reply With Quote
Old Apr 11th, 2002, 07:08 PM   #9
crm13
 
Join Date: Apr 2002
Posts: 6
Default

The array is "date" and one data point
crm13 is offline   Reply With Quote
Old Apr 11th, 2002, 07:23 PM   #10
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
Default

Filter the data using an Advanced AutoFilter and the following computed criteria...

Weekly: =TEXT('Date',"ddd")="Fri"

Monthly: ='Date'=EOMONTH('Date',0)

Quarterly: ='Date'=VLOOKUP('Date',({"1/1","3/31";"4/1","6/30";"7/1","9/30";"10/1","12/31"}&"/"&YEAR('Date'))+0,2)

Yearly: ='Date'=DATE(YEAR('Date'),12,31)


Copy and paste the displayed rows to a new worksheet.

[ This Message was edited by: Mark W. on 2002-04-11 13:49 ]
Mark W. 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 +1. The time now is 08:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 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