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 Feb 24th, 2002, 07:23 AM   #1
Paulasirius
New Member
 
Join Date: Feb 2002
Location: Eastbourne
Posts: 8
Default

I have a financial spreadsheet in Microsoft Excel 97 which contains several worksheets. I am trying to create a formula on a summaries worksheet that will locate the last entry in a payments column on another worksheet containing dates, items and payments. There seems to be no function for referencing a cell that is the last one entered in a column. If I can find a way to do this, I can then use a lookup reference function to copy the date into the summaries worksheet as well. Does anyone know what is the usual way of dealing with this type of referencing?
Paulasirius is offline   Reply With Quote
Old Feb 24th, 2002, 07:34 AM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-02-24 06:23, Paulasirius wrote:
I have a financial spreadsheet in Microsoft Excel 97 which contains several worksheets. I am trying to create a formula on a summaries worksheet that will locate the last entry in a payments column on another worksheet containing dates, items and payments. There seems to be no function for referencing a cell that is the last one entered in a column. If I can find a way to do this, I can then use a lookup reference function to copy the date into the summaries worksheet as well. Does anyone know what is the usual way of dealing with this type of referencing?
Lets say that Sheet1!A:A houses your dates:

=MATCH(9.99999999999999E+307,Sheet1!A:A)

will give you the row number of the last entry. You could equally use the payments column instead of the dates column.


[ This Message was edited by: Aladin Akyurek on 2002-02-24 06:34 ]
Aladin Akyurek is offline   Reply With Quote
Old Feb 24th, 2002, 09:02 AM   #3
Paulasirius
New Member
 
Join Date: Feb 2002
Location: Eastbourne
Posts: 8
Default

Thankyou for that idea. However, it is only necesary to use a number greater than the number of rows you are using in the column. Your 9.9999999999.....E+307 is a number which is 307 digits long, and that is considerably greater than the maximum 65536 rows in any excel sheet. My list will never contain any more than 500 rows, and probably will only ever have 200 in it. So the formula INDEX(Sheet1!F:F,MATCH(500,Sheet1!F:F)) will find the last cell in column F containing data, and the INDEX function returns the value of the found cell. There are certain limitations, but the excel help files explain that well enough.
Thankyou once again.
Paulasirius is offline   Reply With Quote
Old Feb 24th, 2002, 09:15 AM   #4
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-02-24 08:02, Paulasirius wrote:
Thankyou for that idea. However, it is only necesary to use a number greater than the number of rows you are using in the column. Your 9.9999999999.....E+307 is a number which is 307 digits long, and that is considerably greater than the maximum 65536 rows in any excel sheet. My list will never contain any more than 500 rows, and probably will only ever have 200 in it. So the formula INDEX(Sheet1!F:F,MATCH(500,Sheet1!F:F)) will find the last cell in column F containing data, and the INDEX function returns the value of the found cell. There are certain limitations, but the excel help files explain that well enough.
Thankyou once again.
I'd sugguest not using yours. Mine doesn't have anything to do with the available number of rows.

Use rather:

=INDEX(Sheet1!F:F,MATCH(9.99999999999999E+307,Sheet1!F:F))

If F contains dates, enter as last entry in F

18-Jun-2002 and see what you get.

Aladin

Addendum:

See

http://www.mrexcel.com/wwwboard/messages/18830.html

for an explanation of 9.99999999999999E+307.

[ This Message was edited by: Aladin Akyurek on 2002-02-24 08:39 ]
Aladin Akyurek is offline   Reply With Quote
Old Feb 24th, 2002, 10:14 AM   #5
Paulasirius
New Member
 
Join Date: Feb 2002
Location: Eastbourne
Posts: 8
Default

Of course, and how silly of me. Sorry about that. Even so, I cannot see why such a large 307 digit number needs to be used for practical everyday work.
Wouldn't a number larger than any payment I'm likely to make on my credit cards suffice? Say 100 when I never make payments over 90 for instance.
Do you know what the help files mean by saying that MATCH only works when the data is in ascending order, because my payments are not in any order yet the formula works.
Paulasirius is offline   Reply With Quote
Old Feb 24th, 2002, 10:44 AM   #6
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Paula,

" I cannot see why such a large 307 digit number needs to be used for practical everyday work.
Wouldn't a number larger than any payment I'm likely to make on my credit cards suffice? Say 100 when I never make payments over 90 for instance."

Sure, as long as it's guaranteed that there never will be any number bigger than X (which is significantly smaller than the max number I mentioned. You have of course to remember that when you have another application in which you need to apply it to a dates column, for example. I'd say: stay safe. Such a big number doesn't do any harm performancewise at all.

"Do you know what the help files mean by saying that MATCH only works when the data is in ascending order, because my payments are not in any order yet the formula works."

That's exactly its charm: it's insensitive to order or any number of blanks in the range. It works because (match-type being TRUE/1 --which can be omitted) failing to find a number bigger than 9.9...E+307 in the range, MATCH returns the row number of the latest numeric entry it has looked at. That's this "feature" that we're exploiting. It's a useful side-effect, don't you think?

By the way, it can be used only with columns of numeric type.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Feb 25th, 2002, 08:42 AM   #7
Paulasirius
New Member
 
Join Date: Feb 2002
Location: Eastbourne
Posts: 8
Default

Thankyou, Aladin. As a female qualified programmer in Cobol and various Basic dialects, I never got a career due to my age and gender so I got left out in the cold and am now retired and managing all my computing problems alone. You and the others on this web site are a Godsend to me, now at last after three years of struggling with the help files, I will have the benefit of the experiences of real computer pros once again. What a wonderful web site!
Paulasirius 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 01:53 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