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 16th, 2002, 06:16 PM   #1
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Aloha,

Is it possible to set a data validtion where that cell has the sum of other cells. I've tried using custom and using the formula to sum cells and greater than, but evertime test it with a value greater than what I want, I get no warning prompt.



Brian
Brian from Maui is offline   Reply With Quote
Old Mar 16th, 2002, 06:19 PM   #2
smozgur
BatCoder
 
Join Date: Feb 2002
Location: Turkey
Posts: 764
Default

a1, a2, a3, a4 and a5 has data and b1 is the validation cell.

On B1 Tools_Validation
Select Custom
Formula : >SUM(A1:A5)

and your message etc...

regards
suat

[ This Message was edited by: smozgur on 2002-03-16 17:20 ]
smozgur is offline   Reply With Quote
Old Mar 16th, 2002, 06:21 PM   #3
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,065
Default

Hi Brian

Dont see why not!! Ill have a play now 2AM London... a bit later should work out fine...
Set the validation to cell X i guess cell X will be formula so on calculatuin the warning will appear, ckeck all set up ok..



Take care friend.
__________________
Free Excel based Web Toolbar available here.

Jack in the UK
J & R Excel Solutions
"making Excel work for you"
Jack in the UK is offline   Reply With Quote
Old Mar 16th, 2002, 06:23 PM   #4
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

What I want is to set the validation cell of the sum of the cells to say >1800, however the sums may not always excedd 1800.

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 16th, 2002, 07:04 PM   #5
Dave Hawley
Banned
 
Join Date: Feb 2002
Posts: 1,582
Default

Aloha Brian

I'm confused here, why not just use:

=A1>1800

Where A1 is the Validated cell.


Dave Hawley is offline   Reply With Quote
Old Mar 16th, 2002, 07:09 PM   #6
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Dave,

A1 is the sum of say B1:B3. It may not always total 1800, but if it does, I'd like than warning to come out!

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 16th, 2002, 07:17 PM   #7
Dave Hawley
Banned
 
Join Date: Feb 2002
Posts: 1,582
Default

Ok I see, you want the cell containing the SUM function to display a warning if it's value is less than 1800! Cannot be done with Data Validation, sorry. Use this code in the Private Module of the Sheet Object


Private Sub Worksheet_Change(ByVal Target As Range)
If WorksheetFunction.Sum(Range("A1")) <> 1800 Then
MsgBox "Invalid value", vbCritical
Target.Select
End If
End Sub
Dave Hawley is offline   Reply With Quote
Old Mar 16th, 2002, 07:29 PM   #8
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Dave,

Thanks for the code. I really am new to Excel and the users who will be using this workbook are too. I have a conditional format in the adjacent cell that say wt exceeded. For now until I'll use he conditional formatting one. Mahalo for your time, I've spent the better part of two hours trying to figure thsi one out.

Brian
Brian from Maui is offline   Reply With Quote
Old Mar 16th, 2002, 07:43 PM   #9
Dave Hawley
Banned
 
Join Date: Feb 2002
Posts: 1,582
Default

Brian

That's ok. The user would have to do anything though. You just pop in the code and it's done!

But having said this, how about this alternative.

Instead of validating the SUM cell (A1) how about validating the cells the SUM function is refencing with something like:

=SUM($A$1)>1800

Set the Error altert to something other than high so they can still enter a number that may cause A1 to return a value less than 1800. Just in case they need to enter another number that WILL cause it to SUM greater than 1800
Dave Hawley is offline   Reply With Quote
Old Mar 16th, 2002, 07:54 PM   #10
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Dave,

I've tried the code you gave me. I like it!
My first time with something like this. I wold like to expand his to other cells. Do I just copy this again for each cell?

Brian
Brian from Maui 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:10 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