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, 11:32 PM   #1
cpc
New Member
 
Join Date: Mar 2002
Posts: 38
Default

Tough problem for me. Is it possible to have
a formula that is some what self adapting.
I will explain what I mean. I have a list
of numbers. cells a1-a9. cell a10 has the
formula =a1+a2+a3+a4+a5+a6+a7+a8+a9
Assume the formula must be written with each cell noted. The actually set up is with multiple pages, formulas, cells etc.

Problem. If I delete a line, say a4 the formula does not work. ref# is shown in a10
as well as in the formula itself. Is there a
way to create the formula so that if I delete
a line, the formula will simply calculate the
remaining cells.(=a1+a2+a3+a5+a6+a7+a8+a9)
cpc is offline   Reply With Quote
Old Apr 11th, 2002, 11:35 PM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default


=SUM(A1:A9)
Aladin Akyurek is offline   Reply With Quote
Old Apr 11th, 2002, 11:49 PM   #3
cpc
New Member
 
Join Date: Mar 2002
Posts: 38
Default

This will not work. As I mentioned, each cell needs to be listed. If I then delete the line can the formulated cell automatically adjust for the missing cell?
cpc is offline   Reply With Quote
Old Apr 12th, 2002, 12:01 AM   #4
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-04-11 22:49, cpc wrote:
This will not work. As I mentioned, each cell needs to be listed. If I then delete the line can the formulated cell automatically adjust for the missing cell?
"delete the line" means deleting a row, is it not?

Suppose you delete row 4. Are you requiring that the formula that you use

=a1+a2+a3+a5+a6+a7+a8+a9

stays the same, without giving error?

And

=SUM(A1:A9)

does not change to

=SUM(A1:A8) ?


Aladin Akyurek is offline   Reply With Quote
Old Apr 12th, 2002, 12:11 PM   #5
cpc
New Member
 
Join Date: Mar 2002
Posts: 38
Default

Aladin,

If I understand your comment, the answer is yes. Assume you can not use the formula
=sum(a1:a9) You must list each cell in the formula. ie a1+a2+a3 and so on. When you
delete a row, and the formula now has a ref#
instead of the a4 ie the deleted row, can the formula ignore this ref# and still calculate
the remaining cells listed in the formula..
cpc is offline   Reply With Quote
Old Apr 12th, 2002, 12:22 PM   #6
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Assume you can not use the formula
=sum(a1:a9) You must list each cell in the formula. ie a1+a2+a3 and so on. When you
delete a row, and the formula now has a ref#
instead of the a4 ie the deleted row, can the formula ignore this ref# and still calculate the remaining cells listed in the formula.


No. But, why do you need to sum a range using the + operator that requires its operands to be explicitly listed?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Apr 12th, 2002, 12:36 PM   #7
croweld89
New Member
 
Join Date: Mar 2002
Posts: 34
Default

I understand exactly what you mean. I have a spreadsheet littered with this type of problem.

I was able to get each page looking exactly the same and use the following formula:

=sum(sheet1:sheet3!A1)

Is this or a variant of possible in your spreadsheet?

I do not beleive that using the "+" operator is allows a dependant to be deleted without giving a #ref error. However, similar formulas that will. I'm still pondering another solution.
croweld89 is offline   Reply With Quote
Old Apr 12th, 2002, 01:00 PM   #8
cpc
New Member
 
Join Date: Mar 2002
Posts: 38
Default

Aladin,

This type of formula needs to be used because in actuality the formula may pick up every other cell, not a1:a9, or a group of numbers and then a few single cells, or totals from
say 25 pages, when I want to delete say the last four pages. This maybe another way of looking at the problem. I have lists of numbers as described, and a total. (the formula in question) on say 49 pages, with page 50 being a grand total of all 49 pages.
If I delete say pages 40-49, asuume they are not being used, the formula on page 50 no longer works. Unless I re - formulate the cell. Can this formula on page 50 be written to allow for the deletion of pages.

croweld89 look at the above. Do you think your idea will work here?
cpc is offline   Reply With Quote
Old Apr 12th, 2002, 01:17 PM   #9
croweld89
New Member
 
Join Date: Mar 2002
Posts: 34
Default

Let's divide by 10 pages...

Say sheets 1 - 4 are populated and sheet 5 gives a grand total summary of the previous pages. If (and the big if), you can make sheets 1 - 4 the same, then this will work.

For example, we put "5" in cell D4 on sheets 1 - 4. Then on sheet 5 in cell B11 (or whatever cell you need) place the formula:

=sum(sheet1:sheet4!D4)

This will allow you to delete all but one sheets without receiving an error. This requires all formulas on sheet 5 to pull data that are only in the same cell on all 4 sheets. Let me know if this is possible.

There should be an alternative combining the index/match formulas, however, I have not adepted this formula yet.

-Dave
croweld89 is offline   Reply With Quote
Old Apr 12th, 2002, 02:30 PM   #10
Scott R
Board Regular
 
Join Date: Feb 2002
Location: WA state
Posts: 332
Default

I don't see any way around manually editing your formulas. If possible, build your worksheets so that you won't have to delete the references that your formulas are built around.
Scott R 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 09:46 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