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 14th, 2002, 07:43 AM   #1
Guest
 
Posts: n/a
Default

I have no doubt several on this forum could propose a better solution to the problem stated below, but if not, I need to add code that triggers a recalc when a different sheet is selected.

My workbook contains a number of sheets, each with many formulas including two that reference another file with a VLOOKUP. When I change to a different sheet, the two cells whose formulas include VLOOKUP continue to display the result from the previously selected sheet until a recalc occurs. I can force an update by F9 or by entering something in another cell which triggers the recalc.

Should the two cells in question update when the sheet they're on is selected? Or must I add some code to force a recalc when a new sheet is selected?

This probably has something to do with the two formulas using the sheet name to determine where the VLOOKUP occurs. I'll post the formulas below. Maybe there's a better way to do the same thing without creating the problem described above.

=RIGHT(CELL("filename"),LEN(CELL("filename"))-SEARCH("]",CELL("filename")))&" "&(VLOOKUP(RIGHT(CELL("filename"),LEN(CELL("filename"))-SEARCH("]",CELL("filename"))),'C:\1JF\HR\[Employee info.xls]Summary'!$A$3:$B$25,2,FALSE))

=VLOOKUP(RIGHT(CELL("filename"),LEN(CELL("filename"))-SEARCH("]",CELL("filename"))),'C:\1JF\HR\[Employee info.xls]Summary'!$A$3:$D$25,4,FALSE)
  Reply With Quote
Old Mar 14th, 2002, 07:44 AM   #2
pilot
Board Regular
 
Join Date: Feb 2002
Location: Houston, TX
Posts: 303
Default

Meant to post above under my username.
pilot is offline   Reply With Quote
Old Mar 15th, 2002, 06:15 AM   #3
pilot
Board Regular
 
Join Date: Feb 2002
Location: Houston, TX
Posts: 303
Default

Requesting assistance, one more try. Any takers?
pilot is offline   Reply With Quote
Old Mar 18th, 2002, 06:43 AM   #4
pilot
Board Regular
 
Join Date: Feb 2002
Location: Houston, TX
Posts: 303
Default

Last try, can anyone help with this?
pilot is offline   Reply With Quote
Old Mar 19th, 2002, 01:47 PM   #5
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Hi Pilot,

hopefully someone more knowledgeable can add to this, but I think it has something to do with the fact that your =cell"filename" function isn't anchored.......

when I use that to pop the filename on my printouts, I always anchor it thusly :

=cell("filename",aa9999)

I seem to remember reading on this board that the cell reference (aa9999) anchors it to the active sheet or something

I've seen a co-worker do the same but miss out the last bit and he then got printouts with all the same sheet name on them, sort of defeating the object of the function

lots of replies will say use a1 or $a$1 to anchor, but I find I often delete the first row or column for whatever reason...so the aa9999 reference just takes care of my penchant for deleting....

Hope this helps, albeit very late

Chris
Chris Davison is offline   Reply With Quote
Old Mar 19th, 2002, 05:10 PM   #6
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,065
Default

Chris

BTW

Anchors???

I always fell top left A1
better than bot right IV666536 as will effect size of sheet proformanc eand search

erh! i getting a twitch already

why delet row 1 whats it done to you, remove that and they all might fall off!

I NEVER delete A col or row 1 as they are my dunmping grounds....

idea??

__________________
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 21st, 2002, 12:27 PM   #7
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Quote:
On 2002-03-19 16:10, Jack in the UK wrote:
... as will effect size of sheet proformanc eand search

erh! i getting a twitch already

why delet row 1 whats it done to you, remove that and they all might fall off!

I NEVER delete A col or row 1 as they are my dunmping grounds....

idea??

Hmmmm, good point Jack.... I hadn't thought about the effects on filesize and search time.... maybe I'll slim it down to "Z99" or something.

reason, I often delete row 1 through the design process and as I expand the worksheet (say, formula hiding and subtotals etc etc)

ditto with the first column - I usually leave column A as a border (have a look at the F1 prediction spreadsheet) there's nothing in it...it's a border ! sometimes I delete it if I've run out of printing space at 100%

just the way I design things, I guess !


Chris Davison is offline   Reply With Quote
Old Mar 21st, 2002, 12:34 PM   #8
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Chris,

Try

=CELL("filename",INDIRECT("A1"))

to circumvent the touble ensuing of your habit of "deleting column A," entered of course somewhere else than in A1 itself.

BTW, that usage of "anchor", I'm afraid, points to me.

Aladin

Aladin Akyurek is offline   Reply With Quote
Old Mar 21st, 2002, 01:09 PM   #9
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,065
Default

Chris

Your way or my way hows the best?

I dont know or care! Its a care of awairness i learn for you and i pray to everyone they learn just the smallisty snip of what i have to offer, then i truly be happy i speak from the heart and heart on sleave, what else fro Simple South London boy!

No be seriouse your work i have seen iand is PERFECTION and very well designed, and we all can learn lots from you, i just happen yo have a passionate love affair with row 1 and so she loves me and she stay, the way i work?? It matter not a drop how or why.. but i take on board your commenst and i to use cells as boarders in colour.

I will tell you secret, F1 predictions are causing me agros EVERYONE wants it and i work for softwaRE DESIGN COMPAMY!

ether way.. good points.

Aladin is 100% if a minimun and so ancors is his way, if we follow iom sure we wil be just abvout 100% if we hit a few problems along the way.. Again my way is to lock the minimun and roll what i can.. why??? I dont know just my way,

ALL in all a very intresting post feed this as we have opened honest open comments and all seem to agree we all are best and all have a cool way to work, and each others is just as cool and just as best ...

No wonder i love excel....... cheers guys.
__________________
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
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 07:50 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