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, 11:43 AM   #1
hallhv01
New Member
 
Join Date: May 2002
Posts: 25
Default

OK, my last question was how to count only if two columns were the specified value. The array function worked - thanks: {=SUM(IF($F$2:$F$30="s-j",IF($L$2:$L$30=TRUE,1,0),0))}. I have copied this formula to count all the s-j, s-e, c-j, c-e, etc. in separate totals.

So now I have a third column, I will call it column A, that has dates ordered decending mm/dd/yy.
I have a cell in this model, I will call it C1, where I can type in a number, formated as a % that is to indicate the total % of all s-e, s-j, c-e, c-j etc. with true to be counted (formula above). This would be simple (C1*each total), but it is the top X% by date (column A), that need to be counted. So we could have all the 20% in one category, say s-e, if those were the top 20% of the dates, then the totals for S-j and so on should be blank. The end result needs to be the original groupings of totals I had from the formula above, but with only the top X% by date counted. So essentially it is adding one more componet to the count function above, to only count if the date is in the top X% if it is s-e etc. in one colunm, and true in the other.
I hope this made sense.
Thanks!!

OK, here is some clarification, in the responses I am seeing so far, I think there is a set date in the formulas, in fact the date is variable, some top percentage. I need to count all s-j's for example in one colunm, only if another column is true, I do the same thing over for s-e, c-e, c-j ect using {=SUM(IF($F$2:$F$30="s-e",IF($L$2:$L$30=TRUE,1,0),0))}. Then the date column comes in. I need the above, but count only if the date is in the top 20%, or whatever % I choose. The dates range from the 1960s to the present, none are the same, I need to have it count only the top ?%.
Example:
So I should not count s-j, true, 3/3/76 if it is not in the top (say 30%) of the dates, but I should count it if it is in the top 30% of the dates.
The spreadsheet is sorted by date in decending order. Maybe there is a way to tell it based on how many rows to only apply my formula to the top X percent of the rows?


[ This Message was edited by: hallhv01 on 2002-05-20 13:07 ]
hallhv01 is offline   Reply With Quote
Old May 20th, 2002, 01:02 PM   #2
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default


I am not really sure of your question.
You can modify the following.
It checks your 2 criteria and counts them if they are in a particular date range. I used number instead of date format since people use a variety of date formats.

=SUMPRODUCT((F2:F30="s-j")*(L2:L30=TRUE)*(A2:A30>37380)*(A2:A30<37400))
Dave Patton is offline   Reply With Quote
Old May 20th, 2002, 01:06 PM   #3
NateO
Legend
 
NateO's Avatar
 
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
Default

You can use this:

Microsoft Excel - Book1_______________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=s-j
*ABCD
1s-jTRUE12/31/2002:alert("{=SUM((A1:A33="s-j")*(B1:B33=TRUE)*(C1:C33=DATEVALUE("12/31/2002")))}")>2
2s-jTRUE12/31/2002*
Sheet1

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

The above image was automatically generated by [HtmlMaker V1.23]
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


Where the formula under 2 is:

{=SUM((A1:A33="s-j")*(B1:B33=TRUE)*(C1:C33=DATEVALUE("12/31/2002")))}
__________________
Regards,
Nate Oliver
Microsoft Excel MVP
Nate's Excel Blog
NateO 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 01:13 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