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 Mar 12th, 2002, 09:16 AM   #1
Guest
 
Posts: n/a
Default

Aloha!

I have this array formula:

=sumproduct((sep.!$b$1:sep.!$b$360="employee name")*(sep.!$d$1:sep.!$d$360="vac"),sep.!$c$1:sep.!$c$1:sep.!$c$360)+sumproduct(sep.!$g$1:sep.!$g$360="employee name")*(sep.!$i$1:sep.!$i$360="vac"),sep.!$h$1:sep.!$h$360)

It's not summing correctly, when it should be 80 it's summing 72, missing a day. I've been trying to figure this out to no avail. Anybody has any ideas. Cells are formatted correctly.

Brian
  Reply With Quote
Old Mar 12th, 2002, 09:17 AM   #2
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Sorry , that was my post above!

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 12th, 2002, 09:31 AM   #3
RaoulF
New Member
 
Join Date: Mar 2002
Location: London, UK
Posts: 17
Default

Brian

I haven't tried your formula, but looking at it the following looks a bit odd, is it meant to include the $C$1 twice?

$c$1:$c$1:$c$360

Raoul
RaoulF is offline   Reply With Quote
Old Mar 12th, 2002, 09:37 AM   #4
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-03-12 08:16, Anonymous wrote:
Aloha!

I have this array formula:

=sumproduct((sep.!$b$1:sep.!$b$360="employee name")*(sep.!$d$1:sep.!$d$360="vac"),sep.!$c$1:sep.!$c$1:sep.!$c$360)+sumproduct(sep.!$g$1:sep.!$g$360="employee name")*(sep.!$i$1:sep.!$i$360="vac"),sep.!$h$1:sep.!$h$360)

It's not summing correctly, when it should be 80 it's summing 72, missing a day. I've been trying to figure this out to no avail. Anybody has any ideas. Cells are formatted correctly.

Brian
=sumproduct((sep.!$b$1:$b$360="employee name")*(sep.!$d$1:$d$360="vac"),sep.!$c$1:$c$360)+sumproduct(sep.!$g$1:$g$360="employee name")*(sep.!$i$1:$i$360="vac"),sep.!$h$1:$h$360)

as Raoul observes and you don't need and shouldn't array-enter this formula.

By the way, wouldn't "sep" instead of "sep." do as sheet name?

Aladin

[ This Message was edited by: Aladin Akyurek on 2002-03-12 08:40 ]
Aladin Akyurek is offline   Reply With Quote
Old Mar 12th, 2002, 09:38 AM   #5
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Sorry it's a typo:

should be:

sep.!$c$1:sep.!$c$360
Brian from Maui is offline   Reply With Quote
Old Mar 12th, 2002, 09:43 AM   #6
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Re: Sep.

Yes it would! Let me try this without CSE.

It's a rookie mistake, which I have been making a lot!

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 12th, 2002, 09:48 AM   #7
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Aloha!

Tried it and still doesn't pick up a day, still summing 72 instead of 80.

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 12th, 2002, 10:59 AM   #8
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Aloha!

I found the error in the sheet that had the data. I deleted rows then added the rows back. Then the formula summed the values correctly. Anyone know why that's so?

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 12th, 2002, 11:49 AM   #9
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-03-12 09:59, Brian from Maui wrote:
Aloha!

I found the error in the sheet that had the data. I deleted rows then added the rows back. Then the formula summed the values correctly. Anyone know why that's so?

Brian
Brian,

Here is the modified SUMPRODUCT formula that you can use:

=SUMPRODUCT((MAR!$B$4:$B$360=$B3)*(MAR!$D$4:$D$360="VAC"),MAR!$C$4:$C$360)+SUMPRODUCT((MAR!$G$4:$G$360=$B3)*(MAR!$I$4:$I$360="VAC"),MAR!$H$4:$H$360)

As you can see I modified the sheet names with periods in them into ones without. The former clutters in my opinion the formula.

I created a hidden column B, which now contains the names whose vacation hours are totaled.

I did a few checks on why the total 72 instead of 80 for Garcia. Didn't find anything like an extra space. The "time" entries appear all numeric. So I'm curious which row on you MAY sheet is in error in the WB you sent me.

I'm resending the WB back, where you can replace the erroneous record/row with the right one. I'd urge to use this WB. & don't forget, will you: it's very seldom the case that the SUMPRODUCT formulas are array-entered.

Aladin
Aladin Akyurek 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