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 23rd, 2002, 01:20 PM   #1
kko
New Member
 
Join Date: Apr 2002
Posts: 2
Default

I have a problem: I have to have the filename of the workbook with path to a cell. There is a function called info to have path but how can you do the filename?
kko is offline   Reply With Quote
Old Apr 23rd, 2002, 01:32 PM   #2
Al Chara
MrExcel MVP
 
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
Default

Probably an easier way but try the following:

=INFO("directory") & GetName & ".xls"

Where GetName is a defined name that is referenced as:

=GET.WORKBOOK(16)







__________________
Kind regards,

Al Chara
Al Chara is offline   Reply With Quote
Old Apr 23rd, 2002, 01:55 PM   #3
kko
New Member
 
Join Date: Apr 2002
Posts: 2
Default

Probably an easier way but try the following:

=INFO("directory") & GetName & ".xls"

Where GetName is a defined name that is referenced as:

=GET.WORKBOOK(16)


I have a Finnish version of Excel and functions are translated to Finnish. Any resources to get functions Finnish/english translations?


kko
kko is offline   Reply With Quote
Old May 12th, 2002, 07:32 PM   #4
Corni
Board Regular
 
Join Date: Mar 2002
Location: Brampton
Posts: 324
Default

What about:

=cell("filename")
Corni is offline   Reply With Quote
Old May 12th, 2002, 08:40 PM   #5
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-05-12 18:32, Corni wrote:
What about:

=cell("filename")
Yes Corni:
=cell("filename") will provide the full filename, including the complete path.
Yogi Anand is offline   Reply With Quote
Old May 12th, 2002, 08:53 PM   #6
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Quote:
On 2002-05-12 19:40, Yogi Anand wrote:
Quote:
On 2002-05-12 18:32, Corni wrote:
What about:

=cell("filename")
Yes Corni:
=cell("filename") will provide the full filename, including the complete path.
anchoring it :

=cell("filename",a1) will include the sheetname of the sheet the formula is entered in also

(can't help much with Finnish translation though, sorry!)


__________________
:: Pharma Z - Family drugstore ::
Chris Davison is offline   Reply With Quote
Old May 12th, 2002, 10:20 PM   #7
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Hi Chris:
I have not figured out what additional benefit is there in including the second argument ... by the way with or without the second argument viz

=cell("filename")
and
=cell("filename",a1)
both give the same result including the sheet name

I know in most cases of using the cell() function with different info types, use of the second argument 'reference' is either desirable or necessary. However in case of info type 'filename', it does not seem to make any difference.

I used to make good use of the similar function cellpointer in working with Lotus 123.

Regards!



[ This Message was edited by: Yogi Anand on 2002-05-12 21:22 ]
Yogi Anand is offline   Reply With Quote
Old May 13th, 2002, 06:24 AM   #8
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Quote:
On 2002-05-12 21:20, Yogi Anand wrote:
Hi Chris:
I have not figured out what additional benefit is there in including the second argument ... by the way with or without the second argument viz

=cell("filename")
and
=cell("filename",a1)
both give the same result including the sheet name
nd on 2002-05-12 21:22 ]
Yes, it's an awkward little function.

Pop your =cell("filename") in 3 of your sheets and take a good look at what each brings back as the sheetname, you'll see they are all the same.... sheet3 on all of them, or sheet1 on all of them, depending on which sheet holds the last-used cell.

Goto sheet 1 and enter something in any cell. the fileref will read "sheet1"... take a look at sheet 2 - it will also say "sheet 1" cos of the last active cell.

This could cause havoc if you're using this as part of a relative referencing formula

(trust me, I wasted many an hour at work before I realised this !!)

Anchoring it with A1 specifies the actual sheet the formula is placed on and does not defer to whatever the last-used cell is.

(Personally, I anchor it with AA99 as I often delete cell A1 throughout the dynamic design process)



_________________
Hope this helps,
Chris
(Excel '97, Windows ME)

marker A1 anchor

[ This Message was edited by: Chris Davison on 2002-05-13 05:35 ]
Chris Davison is offline   Reply With Quote
Old May 13th, 2002, 09:08 PM   #9
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
trust me, I wasted many an hour at work before I realised this !!)

Anchoring it with A1 specifies the actual sheet the formula is placed on and does not defer to whatever the last-used cell is.
Thanks Chris

Regards!

Yogi Anand 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:55 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