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 21st, 2002, 10:36 PM   #1
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

I solved an interesting problem on excel a few weeks ago, the aim of asking this question is just out of interest really to see how others would approach this question as I'm sure there is a more elegant way of doing it.

The setup is as follows:

There were 12 files of data, one for each month (Jan.xls, Feb.xls etc.)
In each monthly file, there was data for each day in that month. For example, the data for 1st January was in cols B,C,D. 2nd January in cols E,F,G and so on until the 31st of January's data.

Now the task was as follows - my boss came up to me with a list of data he wanted summarised in chronological order on rows in a spreadsheet. So, he just gave me a list like B5, B8, C53, C36, C87, D2, D34, D100 say and asked to see that data for each day on a spreadsheet.

So, on the final summary spreadsheet, you would have dates from A2 down for 1st Jan right down to 31st Dec with the corresponding data in adjacent columns.

However, there was a hitch in that the monkey who set up the monthly files had messed around with the structure of some of the files. For instance, for the April.xls & May.xls files, the monkey had inserted some 5 rows after row 70, so that original list would be changed to being: B5, B8, C53, C36, C92, D2, D34, D105 for these months.

Anyway, I'm interested in how people here would go about this problem. Needless to say that I felt it appropriate to set up an input sheet thing, because my damn boss kept changing his mind about which cells he wanted to see (and it was not very nice initially to go into VBA code to change things like that, I prefer to do that on an input sheet personally).

My input sheet looked a bit like this anyway, but I'm not entirely happy with the setup since I'm convinced there is a more elegant way of approaching this.
Microsoft Excel - ExtractData.xls______________Running: xl2000 : OS = Windows (32-bit) 4.10
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
A1=Extract Data Tool.

A
B
C
D
E
F
G
H
I
J
K
1
Extract Data Tool.









2











3
File path









4
K:PandVRET79\stakeval









5

Data translated every








6
Sheet3








7
UK Growthcolumn(s).








8


Type 1



Type 2


9
Column headings
MonthsCellsRowCols
MonthsCellsRowCols
10
DATE
JanD4:alert('=IF(D$10=%22%22,%22%22,CELL(%22row%22,INDIRECT(D$10)))')>4:alert('=IF(D10=%22%22,%22%22,CELL(%22col%22,INDIRECT(D10)))')>4
AprilD4:alert('=IF(I10=%22%22,%22%22,CELL(%22row%22,INDIRECT(I10)))')>4:alert('=IF(I10=%22%22,%22%22,CELL(%22col%22,INDIRECT(I10)))')>4
11
TODAY'S LINKED UNIT PRICE
FebB24:alert('=IF(D11=%22%22,%22%22,CELL(%22row%22,INDIRECT(D11)))')>24:alert('=IF(D11=%22%22,%22%22,CELL(%22col%22,INDIRECT(D11)))')>2
MayB24:alert('=IF(I11=%22%22,%22%22,CELL(%22row%22,INDIRECT(I11)))')>24:alert('=IF(I11=%22%22,%22%22,CELL(%22col%22,INDIRECT(I11)))')>2
12
Unit Trust Number
MarC24:alert('=IF(D12=%22%22,%22%22,CELL(%22row%22,INDIRECT(D12)))')>24:alert('=IF(D12=%22%22,%22%22,CELL(%22col%22,INDIRECT(D12)))')>3
JunC24:alert('=IF(I12=%22%22,%22%22,CELL(%22row%22,INDIRECT(I12)))')>24:alert('=IF(I12=%22%22,%22%22,CELL(%22col%22,INDIRECT(I12)))')>3
13
Unit Trust Market Price
OctD44:alert('=IF(D13=%22%22,%22%22,CELL(%22row%22,INDIRECT(D13)))')>44:alert('=IF(D13=%22%22,%22%22,CELL(%22col%22,INDIRECT(D13)))')>4
JulyD44:alert('=IF(I13=%22%22,%22%22,CELL(%22row%22,INDIRECT(I13)))')>44:alert('=IF(I13=%22%22,%22%22,CELL(%22col%22,INDIRECT(I13)))')>4
14
Total Fund Value
NovB72:alert('=IF(D14=%22%22,%22%22,CELL(%22row%22,INDIRECT(D14)))')>72:alert('=IF(D14=%22%22,%22%22,CELL(%22col%22,INDIRECT(D14)))')>2
AugB70:alert('=IF(I14=%22%22,%22%22,CELL(%22row%22,INDIRECT(I14)))')>70:alert('=IF(I14=%22%22,%22%22,CELL(%22col%22,INDIRECT(I14)))')>2
15
Linked Units C/F - number
DecB89:alert('=IF(D15=%22%22,%22%22,CELL(%22row%22,INDIRECT(D15)))')>89:alert('=IF(D15=%22%22,%22%22,CELL(%22col%22,INDIRECT(D15)))')>2

B87:alert('=IF(I15=%22%22,%22%22,CELL(%22row%22,INDIRECT(I15)))')>87:alert('=IF(I15=%22%22,%22%22,CELL(%22col%22,INDIRECT(I15)))')>2
16
STAKEHOLDER LIABILITY UNITS - Number - Linked Units c/f

B103:alert('=IF(D16=%22%22,%22%22,CELL(%22row%22,INDIRECT(D16)))')>103:alert('=IF(D16=%22%22,%22%22,CELL(%22col%22,INDIRECT(D16)))')>2

B101:alert('=IF(I16=%22%22,%22%22,CELL(%22row%22,INDIRECT(I16)))')>101:alert('=IF(I16=%22%22,%22%22,CELL(%22col%22,INDIRECT(I16)))')>2
17
PLYMOUTH LIABILITY UNITS - Number - Linked Units C/F

B114:alert('=IF(D17=%22%22,%22%22,CELL(%22row%22,INDIRECT(D17)))')>114:alert('=IF(D17=%22%22,%22%22,CELL(%22col%22,INDIRECT(D17)))')>2

B112:alert('=IF(I17=%22%22,%22%22,CELL(%22row%22,INDIRECT(I17)))')>112:alert('=IF(I17=%22%22,%22%22,CELL(%22col%22,INDIRECT(I17)))')>2
18
TOTAL Units Check - number

D196:alert('=IF(D18=%22%22,%22%22,CELL(%22row%22,INDIRECT(D18)))')>196:alert('=IF(D18=%22%22,%22%22,CELL(%22col%22,INDIRECT(D18)))')>4

D172:alert('=IF(I18=%22%22,%22%22,CELL(%22row%22,INDIRECT(I18)))')>172:alert('=IF(I18=%22%22,%22%22,CELL(%22col%22,INDIRECT(I18)))')>4
19
Checks - Total no of Units in issue - Market value

D220:alert('=IF(D$19=%22%22,%22%22,CELL(%22row%22,INDIRECT(D$19)))')>220:alert('=IF(D19=%22%22,%22%22,CELL(%22col%22,INDIRECT(D19)))')>4

D196:alert('=IF(I19=%22%22,%22%22,CELL(%22row%22,INDIRECT(I19)))')>196:alert('=IF(I19=%22%22,%22%22,CELL(%22col%22,INDIRECT(I19)))')>4
InputSheet

To see the formula in the cells just click on the cells hyperlink

The above image was automatically generated by[HtmlMaker V1.25]
If you want this code, click here and Colo will email the file to you
This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo



Any ideas or comments appreciated. Thanks.

RET79



[ This Message was edited by: RET79 on 2002-05-21 21:39 ]
RET79 is offline   Reply With Quote
Old May 21st, 2002, 10:42 PM   #2
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

The macro I had was reading off the values on that input sheet, (which were dynamic ranges) so whatever you put on that sheet was used as arrays in the code.

RET79

[ This Message was edited by: RET79 on 2002-05-21 21:47 ]
RET79 is offline   Reply With Quote
Old May 21st, 2002, 11:00 PM   #3
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

OK guys I am off until Friday on a course so won't be here to reply for a couple of days.

RET79
RET79 is offline   Reply With Quote
Old May 24th, 2002, 10:11 AM   #4
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

OK, am back from the course, did anyone have any ideas about this one?

Cheers,

RET79
RET79 is offline   Reply With Quote
Old May 24th, 2002, 04:51 PM   #5
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Oh dear, does no one have any ideas about this one

RET79
RET79 is offline   Reply With Quote
Old May 27th, 2002, 02:31 PM   #6
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

OK, very last call about this one, anyone have some ideas for me?

RET79
RET79 is offline   Reply With Quote
Old May 27th, 2002, 03:49 PM   #7
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Awww, don't get me wrong I am not askign for anyone to come up with a wonder macro or anything like that, I am just asking generally how people would go about getting this task done, I don't expect anyone to get it done for me!

RET79
RET79 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 02:15 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