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 20th, 2002, 03:43 PM   #1
Art B.
New Member
 
Join Date: May 2002
Posts: 13
Default

My workbook takes 22 hours to calculate. From reading posts at this site I understand that if I can replace array formulae (which I’ve used liberally) with EXCEL database functions, calculation will be faster. Toward this objective, can I use DGET or another non-array function to fill “x” in the “Results” worksheet below with the appropriate datum from the “Eggs” field in the “Nest ID” table? (The first two fields in the “Results” sheet are entered manually).

“Nest ID” worksheet:

Date Nest Eggs
5-Jun-01 1 4
5-Jun-01 2 2
6-Jun-01 1 3
6-Jun-01 2 1

“Results” worksheet:

Date Nest Eggs
6-Jun-01 2 x

Here’s the array formula I’ve used to get “x”:

=index(Nest ID!c2:c5,match(a2&b2,Nest ID!a2:a5&Nest ID!b2:b5,0))

Thanks!

P.S. How does one produce tables in posts?

[ This Message was edited by: Art B. on 2002-05-20 14:53 ]
Art B. is offline   Reply With Quote
Old May 20th, 2002, 04:07 PM   #2
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-05-20 14:43, Art B. wrote:
My workbook takes 22 hours to calculate. From reading posts at this site I understand that if I can replace array formulae (which I’ve used liberally) with EXCEL database functions, calculation will be faster. Toward this objective, can I use DGET or another non-array function to fill “x” in the “Results” worksheet below with the appropriate datum from the “Eggs” field in the “Nest ID” table? (The first two fields in the “Results” sheet are entered manually).

“Nest ID” worksheet:

Date Nest Eggs
5-Jun-01 1 4
5-Jun-01 2 2
6-Jun-01 1 3
6-Jun-01 2 1

“Results” worksheet:

Date Nest Eggs
6-Jun-01 2 x

Here’s the array formula I’ve used to get “x”:

=index(Nest ID!c2:c5,match(a2&b2,Nest ID!a2:a5&Nest ID!b2:b5,0))

Thanks!

P.S. How does one produce tables in posts?

[ This Message was edited by: Art B. on 2002-05-20 14:53 ]
You can use the following DGET function ...

=DGET(A1:C5,"Eggs",E1:F2)

where your data is in cells A1:c5, and the criteria is in cells E1:F2
where E1 houses Date
where E2 6-Jun-01
F1 houses Nest
F2 houses 2


__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old May 20th, 2002, 04:11 PM   #3
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-05-20 14:43, Art B. wrote:
My workbook takes 22 hours to calculate. From reading posts at this site I understand that if I can replace array formulae (which I’ve used liberally) with EXCEL database functions, calculation will be faster. Toward this objective, can I use DGET or another non-array function to fill “x” in the “Results” worksheet below with the appropriate datum from the “Eggs” field in the “Nest ID” table? (The first two fields in the “Results” sheet are entered manually).

“Nest ID” worksheet:
[code]
Date Nest Eggs
5-Jun-01 1 4
5-Jun-01 2 2
6-Jun-01 1 3
6-Jun-01 2 1

“Results” worksheet:

Date Nest Eggs
6-Jun-01 2 x
[code]
Here’s the array formula I’ve used to get “x”:

=index(Nest ID!c2:c5,match(a2&b2,Nest ID!a2:a5&Nest ID!b2:b5,0))

Thanks!


[ This Message was edited by: Art B. on 2002-05-20 14:46 ]

[ This Message was edited by: Art B. on 2002-05-20 14:50 ]
I don't think DGET can replace your array-entered INDEX/MATCH.

You might however try trading off space against time as it is called.

In your data sheet, insert a new column next to the Nest column and use that as column to look in with INDEX/MATCH ordinarily entered.

Here is how your Nest ID sheet will look.

Microsoft Excel - aaIndexMatch ArtB.xls___Running: xl2000 : OS = Windows (32-bit) NT 5.00
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
A1=Date

A
B
C
D
1
DateNest
Eggs
2
5-Jun-011:alert('=A2&%22@%22&B2')>37047@14
3
5-Jun-012:alert('=A3&%22@%22&B3')>37047@22
4
6-Jun-011:alert('=A4&%22@%22&B4')>37048@13
5
6-Jun-012:alert('=A5&%22@%22&B5')>37048@21
Nest ID

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

The above image was automatically generated by [HtmlMaker V1.26]
If you want FREE SOFT, 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


Note that the Results sheet does not need to use array-entered INDEX/MATCH formulas.

Microsoft Excel - aaIndexMatch ArtB.xls___Running: xl2000 : OS = Windows (32-bit) NT 5.00
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
A1=Date

A
B
C
D
1
DateNestEggs
2
6-Jun-012:alert("=INDEX(%27Nest%20ID%27!$D$2:$D$5,MATCH(A2&%22@%22&B2,%27Nest%20ID%27!$C$2:$C$5,0))")>1
3




Results

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

The above image was automatically generated by [HtmlMaker V1.26]
If you want FREE SOFT, 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


I believe DGET would require you to have a huge table of criteria in a separate worksheet in order to work. The concatenation of fields, mind you, is also required for DGET.

Aladin

Addendum. As Andreas notes, devising a pivot table would be a good idea.



[ This Message was edited by: Aladin Akyurek on 2002-05-20 15:25 ]
Aladin Akyurek is offline   Reply With Quote
Old May 20th, 2002, 04:13 PM   #4
sen_edp
Board Regular
 
sen_edp's Avatar
 
Join Date: Mar 2002
Location: Hellas
Posts: 553
Default

Hello Art, Hello Yogi

I made an example with Art's Data , and another solution is to use pivot tables , where you can choose dates,nest and you can group dates too.



__________________
Best Regards
Andreas
sen_edp is offline   Reply With Quote
Old May 20th, 2002, 04:27 PM   #5
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-05-20 15:13, sen_edp wrote:
Hello Art, Hello Yogi

I made an example with Art's Data , and another solution is to use pivot tables , where you can choose dates,nest and you can group dates too.
Hi Andreas:
...
and instead of extracting just one value, you can view the entire summary of results --a very powerful tool indeed!

_________________
Yogi Anand

Edit: Deleted inactive website from hardcoded signature

[ This Message was edited by: Yogi Anand on 2003-01-19 13:08 ]
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:43 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