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 11th, 2002, 08:25 AM   #1
Avi
New Member
 
Join Date: Apr 2002
Posts: 2
Default

Hi,

I have an interesting problem for which I have been trying to find a solution to no avail. I will be greatly appreciative if you could help me to do so. Here is the problem:

I would like to include in the criteria argument of the DSUM function an area that is a combination of two physical areas that are physically located in two distinct sheets, say sheet1 and sheet2. sheet1 may include a row of the field names to appear In the criteria, and sheet2 may include the row specifying the constraints corresonding to the field names -- that is, the values by which DSUM determines whether a record meets the criteria with repect to the field names in sheet1. Do you think it is possible to concatenate the two ranges into one and place it in the criteria range of the DSUM function?

To solve that problem, I tried to express a range as an array (i.e., values between curly braces such that comma denotes a move to next column and semi column a move to next row) -- but it did not work, since Excel requires that the criteria in the DSUM function be a reference (e.g., A1:H2) and not in an array represenatation form ( as described above) of the values in that range.

Once again, if you have any idea how to solve that problem, or if that problem could not be overcome, I would be greatly appreciative to learn about the solution.

Thank you in advance

Avi


4/12/2002

Hi guys,

Thank you all for the effort in trying to help me. I'm sorry I did not provide enough details regarding the problem that I am facing.

The problem revolves around the apparent difficulty to create a range out of two non contiguous ranges and place the resultant range in the criteria parameter of the DSUM function. For example, suppose I have a table with field names NAME, CITY, and ANUAL SALARY. I want to find the annual income per a given city using the DSUM function. It sounds simple if I use different criteria range per each city. So for the city of NY, I might have a criteria range consisting of two cells; one cell would have the value CITY and the other BENEATH it would be NY. As such the DSUM functiuon will include the entire table with the fields and their records; the field parameter which will be SALARY; and the criteria which will be a reference to the range I have just mentioned above. Now if I wanted to do the same with respect to another city, I will create another identical DSUM formula, but this time the criteria reference will include a different range where the name of the city would be Albany, for example.

However, what I try to do -- and this is not an exercise -- is use in both cases (NY and Albany) a criteria range that will consist of one common cell, the field name (i.e., CITY), and one other cell corresponding in each of mthese cases to the value of the CITY. In other words, I would like to create MULTIPLE DSUM functions, using in each of the relating criterias the SAME reference to a cell with the value CITY in it and then concatenating (so to speak) that particular cell to another cell that will bear the name of the city. In that respect, DSUM function to find the annual salary for the city of NY might include the cell $A$1 and the cell $A2, assuming $A$1 has the value CITY anf $A2 NY. DSUM function to find the annual salary for Albany will include a criteria range that would consist of the SAME cell $A$1 and another cell that is NOT CONTIGUOUS to $A$1 -- that cell might be $A3.

If you think it's possible to do this or not, I will be glad to learn how you do it.

Thank you all


Avi

[ This Message was edited by: avi on 2002-04-12 12:00 ]
Avi is offline   Reply With Quote
Old Apr 11th, 2002, 08:50 AM   #2
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Hi Avi:
Welcome to the Board!
I tried using information from another worksheet to make up part of the crireria in a DSUM function -- I did not have any problem with that. Can you post part of your table and the criteria you are using and what results you are geting ... and let us take it from there.
__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Apr 11th, 2002, 08:51 AM   #3
Al Chara
MrExcel MVP
 
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
Default

I tried to do what you want, but I don't think DSUM will accept that syntax.
__________________
Kind regards,

Al Chara
Al Chara is offline   Reply With Quote
Old Apr 11th, 2002, 08:56 AM   #4
Al Chara
MrExcel MVP
 
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
Default

Yogi,
I think Avi is trying to use criteria from two different worksheets at the same time, which I can't get to work.

[ This Message was edited by: Al Chara on 2002-04-11 07:57 ]
Al Chara is offline   Reply With Quote
Old Apr 11th, 2002, 10:49 AM   #5
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-04-11 07:56, Al Chara wrote:
Yogi,
I think Avi is trying to use criteria from two different worksheets at the same time, which I can't get to work.

[ This Message was edited by: Al Chara on 2002-04-11 07:57 ]
Hi Al:
I may not have fully understood what Avi is trying to do -- but I did try a simple example, where one of my criterion input was linked to a cell in another worksheet. In any event, why should this be a concern, as long as the D-function works -- at the most he may have to transfer the values that constitute the criteria into the worksheet where the D-function is to be used.
How do you gage the situation?

Regards!
Yogi Anand is offline   Reply With Quote
Old Apr 11th, 2002, 10:53 AM   #6
Al Chara
MrExcel MVP
 
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
Default

Quote:
at the most he may have to transfer the values that constitute the criteria into the worksheet where the D-function is to be used.
I agree with this.
Al Chara 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 07:48 AM.


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