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 5th, 2005, 02:25 AM   #1
Aaron Blood
 
Aaron Blood's Avatar
 
Join Date: Oct 2002
Location: West Palm Beach, Florida
Posts: 335
Default Range Names: Good or Bad?

Curious to hear your thoughts on range names.

1. Do you think defined range names in spreadsheets are good or bad?

2. Would you recommend defined range names as a modelling best practice?


Forgive the cross posting to: MrExcel, OzGrid, Vbax
(some of you just don't respond on the other boards and I don't want to miss the opinions of certain folks I respect on each)
Aaron Blood is offline   Reply With Quote
Old May 5th, 2005, 02:34 AM   #2
erik.van.geit
MrExcel MVP
 
erik.van.geit's Avatar
 
Join Date: Mar 2004
Location: Belgium 3272 Testelt
Posts: 16,994
Default

curious question ...

as a matter of fact defined named ranges are good

it's very usefull for several reasons

here is one reason
used within formulas it's much more clear what formulas are supposed to do
=(A1-reduction)*VAT
=(A1-$Z124) * Sheet1!$E453

another
when you code
Msgbox "the VAT is actually " & Range("VAT") & "%"
this will always be OK
when you use Sheet1!$E453 and change the address your code iwll not work anymore

kind regards,
Erik

PS: some of you just don't respond on the other boards : isn't it their right to select the questions they want to answer ?
__________________
I love Jesus
piano improvisation Abba Father

email Erik

founder of DRAFT

my free Addins
Table-It download & info
Formula Translator 04
erik.van.geit is offline   Reply With Quote
Old May 5th, 2005, 02:38 AM   #3
PA HS Teacher
 
PA HS Teacher's Avatar
 
Join Date: Jul 2004
Location: Rochester, NY
Posts: 2,794
Default

I think named ranges are outstanding. They have a number of advantages.

1. If I have 100 formulas that refer to a given range. I can just redefine the range, and I don't have to change a single formula. (also convenient for graphs where the data range changes.)

2. If I want a drop down list, I can use a named range to refer to cells that are on another worksheet.

3. If I have a really long reference, like to another sheet I can use a short name range. This makes a long formula much shorter and much easier to decipher. (it's also useful if you run into the 1024 character limit for formulas.)

4. Named ranges can be more intuitive when writing a spreadsheet and can make the logic of a spreadsheet more transparent.

5. See Aladins post about dependent drop down menus. (only possible with named ranges.)


Named Ranges = Good Practice
[Edit:]

This:
=SUM('Really Long Named Sheet of Info'!$IV$25000:$IV$65000)^('Really Long Named Sheet of Info'!$IU$20000+'Really Long Named Sheet of Info'!$IU$20000+1)

Can become this:
=A^(B+B+1)

Where A and B are named ranges.
PA HS Teacher is offline   Reply With Quote
Old May 5th, 2005, 02:47 AM   #4
Justinlabenne
 
Justinlabenne's Avatar
 
Join Date: Jun 2004
Location: Ohio
Posts: 959
Default

Most often I create dynamic ranges that will adjust when adding or removing information. It really depends on who the user will be, and will they ever see the named range and wonder: "What the hell does this mean?"

It has is purposes, and I tend to use them sparingly and prefer not to in formulas, unless the formula will need to be adjusted according to data entered. When I build something, sometimes I use none, other times I use quite alot. Just depends what purpose they serve in the individual application, and what ever seems easier to update later on.

I saw alot of people at work who, when showed how to name a range, used it like it was going out of style and now have named ranges all over the place in their workbook, wonder why they sometimes get those notorius "ghost links" that they can't get rid of.

Good Points / Bad Points
__________________
Justin Labenne
www.jlxl.net
Justinlabenne is offline   Reply With Quote
Old May 5th, 2005, 02:56 AM   #5
erik.van.geit
MrExcel MVP
 
erik.van.geit's Avatar
 
Join Date: Mar 2004
Location: Belgium 3272 Testelt
Posts: 16,994
Default

some philosophy

a pillow is a good thing when used for sleeping ... but can be used for very bad things ... brrr
__________________
I love Jesus
piano improvisation Abba Father

email Erik

founder of DRAFT

my free Addins
Table-It download & info
Formula Translator 04
erik.van.geit is offline   Reply With Quote
Old May 5th, 2005, 05:45 AM   #6
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default Re: Range Names: Good or Bad?

Quote:
Originally Posted by Aaron Blood
Curious to hear your thoughts on range names.

1. Do you think defined range names in spreadsheets are good or bad?

2. Would you recommend defined range names as a modelling best practice?


Forgive the cross posting to: MrExcel, OzGrid, Vbax
(some of you just don't respond on the other boards and I don't want to miss the opinions of certain folks I respect on each)
I really like using defined names and defined formulae, especially when I need to nest names within other names. I find it cleans up the UI for the viewer. Rather than having a three line formula bar, I have a quick description of what the formula is.

Editing these can be a major hassle, though, especially with the nested ones. There is a definite downside.

For a sophisticated user, I would rate them Good. For a novice or intermediate user, I would rate them Bad. An inexperienced user needs to learn the basics of working through a worksheet/workbook and learning cell referencing in the formula construction. Defined names mess that up. Or, more precisely, the name can obscure what is going on in Excel.

Once the user is comfortable with referencing, then the names can be a powerful tool to use. I find that they only serve to confuse the inexperienced user.

Just my $0.02.
__________________
Bye,
Jay
Jay Petrulis is offline   Reply With Quote
Old May 5th, 2005, 05:02 PM   #7
Gates Is Antichrist
 
Gates Is Antichrist's Avatar
 
Join Date: Aug 2002
Location: Earth (on working assignment from Hell)
Posts: 1,961
Default

Fixed (absolute) ranges are simply lovely. However I would use more than a single letter (or letter and digit) for their names, to avoid confusion with column or cells.

Dynamic (relative, not absolute) ranges are cute and fun to show off and generate pride. When you make one you well might call everyone in the office or neighborhood over to show it off, because they can be vastly, vastly powerful in compacting/simplifying references. And ... they are almighty hell to maintain, in many circumstances. They [to a degree] defeat dependency auditing. If you use Intersect to determine if a cell is in a range - who knows what you'll get with those dynamic ranges. As I recall, F5 does not recognize them. And if you look at the defined range dialog, the address it "refers to" is as reliable as a Clinton answer to a Senate investigation. Move one cell to the right, and it "parses a different answer." Slithery little buggars!

Unless you're in a very well documented environment, or are the person who created the range, often you're not aware of these shifty animals; I have personally outlawed relative ranges for any reusable or portable or maintained-by-another workbook. Yet I fully appreciate the immense convenience they can provide otherwise.
__________________
Outlook 2007: Try to find undo and redo now in the menus and icons. I'm not kidding. Microsoft, you CLUELESS ***TARDS.
Gates Is Antichrist is offline   Reply With Quote
Old May 5th, 2005, 08:01 PM   #8
shades
 
shades's Avatar
 
Join Date: Mar 2002
Location: Near the Land of Oz
Posts: 1,548
Default

95% of the Excel work I do is for my own projects. I normally start developing the workbook with straight ranges. I troubleshoot everything with specific ranges to make sure it works, play with it some more and get the bugs ironed out, then I move to named ranges, especially dynamic named ranges.

On those occasions when I help someone else setup a workbook, I follow the same procedures, but walk them through the steps of using named ranges. Then I help them troubleshoot, and finally let them troubleshoot on their own.

Of course, I am not an Excel developer, I just get asked to help many others in the company "solve a little problem".
__________________
- old, slow, and confused
... but at least I'm inconsistent -

(retired Excel 2003 user, 3.28.2008)
shades 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 +1. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2010 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