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 27th, 2002, 07:33 AM   #1
meta182
New Member
 
Join Date: Mar 2002
Location: mike
Posts: 4
Default

I am very new to excel. I am trying to add 4 columns and 3 others only if there is a maximun value in those last 3 columns. This is what I came up with but it does not work. Can anyone help?
=N2+P2+R2+T2+IF(MAX(J2:J25),+J29,+IF(MAX(K2:K25),+K29,+IF(MAX(L2:L25),+L29)))

I should have been more clear, sorry I'm new and thank you for all your responses.

The 3 columns I'm speaking of. All I want to do is look in each column, find the highest value in, let's say J2:j25 then that person associated with the high value gets another result added to his winnings. It's a golf thing. Thanks for your help sorry if this is unclear.

[ This Message was edited by: meta182 on 2002-03-27 06:34 ]

[ This Message was edited by: meta182 on 2002-03-27 06:37 ]

[ This Message was edited by: meta182 on 2002-03-27 10:48 ]
meta182 is offline   Reply With Quote
Old Mar 27th, 2002, 08:32 AM   #2
LarryJ
Board Regular
 
Join Date: Mar 2002
Location: Houston, TX
Posts: 60
Default

I'm not real clear on what you mean with the maximum value statement, but I think your problem is the Max function.

It will return the Maximum value in the specified range. So maybe you need to compare that returned value to what you consider to be a maximum value?

If you don't specifiy anything to compare, then Max returns the highest number in the range and the IF would consider that to be a TRUE value, so you would always get J29 added to your value (unless there was no data at all in the range).

If you are wanting to add J29, K29 and L29 to the other 4, then I think your IF statement is going to have to be MUCH bigger.

As it is, you can only do one thing in the TRUE/FALSE part of the IF statement. So you could not have +J29 and include more processing for K29 and L29 in the TRUE part of the first IF statement.

Maybe something like this would work (assuming there is a known MAX value of 99):

=N2+P2+R2+T2+IF(MAX(J2:J25)=99,+J29,0)+IF(MAX(K2:K25)=99,+K29,0)+IF(MAX(L2:L25)=99,+L29,0)

This should add J29 to the first 4 if the max value in the range is 99;otherwise it adds 0 (not really needed but good form). Then goes on to add each of the other values under the same conditions.

Hope that helps.

[ This Message was edited by: LarryJ on 2002-03-27 07:33 ]
LarryJ is offline   Reply With Quote
Old Mar 27th, 2002, 08:36 AM   #3
IML
MrExcel MVP
 
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
Default

What do you mean by only if there is a maximun value in those last 3 columns?

Every column with numbers would have a maximum value, wouldn't it? It looks like you may be on the right track, but you just need to compare your if statement do something. If the maximum of that column is X, what should you compare it to to see if it should be added?
IML is offline   Reply With Quote
Old Mar 27th, 2002, 08:42 AM   #4
markbanin
New Member
 
Join Date: Mar 2002
Posts: 14
Default

I don't understand, under what conditions do you want to add the 3 columns, please explain more.
markbanin is offline   Reply With Quote
Old Mar 27th, 2002, 09:03 AM   #5
wi_guy
Board Regular
 
Join Date: Mar 2002
Posts: 50
Default

If you can add a column that checks for the max in columns J,K,L, etc.....like....=IF(J2=MAX(J$2:J$25),1,0).....you would get a 1 for the MAX # and 0 for the rest.....then your summation formula would be (assuming the new columns are WXY) N2+p2+r2+t2+J2*W2+K2*X2+L2*Y2

HOPE I UNDERSTOOD IT RIGHT
wi_guy 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 12:19 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