![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: May 2004
Location: Vantaa, Finland
Posts: 1,194
|
Hey there
I see this 9.99999999999.. to be used now and then in formulas like =IF((Sheet2!D2<>"")*(Sheet2!D2=$A$1),LOOKUP(9.99999999999999E+307,$B$1:B1)+1,"") What is the function of that. I know it works in those cases I have seen but I would like to learn how to use it and why? Regards Pekka :o :o :o |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
|
9.99999999999999E+307 is the largest numeric value that can be represented in Excel. When you search for this value using an approximate lookup (i.e., when MATCH's 3rd, optional argument is 1 or omitted) then the last value in the lookup array is returned. LOOKUP is always an approximate match. Quoting the LOOKUP Help topic...
Quote:
__________________
Windows XP Pro/Office 2003 SP2 |
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 40,228
|
Quote:
B) Lookup functions like: MATCH(LookupValue,Reference,MatchType), with MatchTpe = 1, VLOOKUP(LookupValue,Reference,1,MatchType), with MatchType = 1, HLOOKUP(LookupValue,Reference,1,MatchType), with MatchType = 1,and LOOKUP(LookupValue,Reference) all invoke binary search and attempt to return a result, conditioned upon the fact that matching/binary search finds the largest value that is less than or equal to the lookup value. C) 9.99999999999999E+307 is the largest positive number Excel knows (hereafter, referred to as BigNum). D) BigNum is an improbable value to occur in references of interest to us. Given A-D, whenever there is a need to retrieve the last numerical value from a reference [1] or to determine the position of the last numerical value in a reference [2], we can invoke for... [1] =LOOKUP(BigNum,Reference) =INDEX(Reference,MATCH(BigNum,Reference)) =VLOOKUP(BigNum,Reference,1), and for... [2] =MATCH(BigNum,Reference) With MatchType omitted, Excel defaults to 1 (or TRUE). LOOKUP() is designed, as it were, to operate under MatchType = 1. Note that BigNum is preferred instead of MAX(Reference)+1, which would play an identical role in the foregoing formulas, for reasons of efficiency: not too loose processing cycles with MAX. For more, search on this board and thru Google. |
|
|
|
|
|
|
#4 | |
|
Join Date: May 2003
Location: Katy, Texas
Posts: 3,829
|
Aladin wrote:
Quote:
=9^323, which Excel shows as 1.6609E+308 =5^441, which Excel shows as 1.3762E+308 =3^646, which Excel shows as 1.6609E+308 (this one, 3^646, is mathematically identical to the first one, 9^323). Now, I have a sneaking suspicion that, at least without further magic, 1.6609E+308 just might be THE largest number. Am I wrong?
__________________
Ralph A. Esquivel, Excel 97 SR2 (Ver. 8.0), Windows XP, Home Edition, Service Pack 2, HP LaserJet 4L printer. |
|
|
|
|
|
|
#5 | ||
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 40,228
|
Quote:
Feature Maximum limit Number precision 15 digits Largest number allowed to be typed into a cell 9.99999999999999E+307 Largest allowed positive number 1.79769313486231E+308 Smallest allowed negative number -2.2250738585072E-308 Smallest allowed positive number 2.229E-308 Largest allowed negative number -1E-307 Length of formula contents 1,024 characters Iterations 32,767 Worksheet arrays Limited by available memory. Also, arrays cannot refer to entire columns. For example, an array cannot refer to the entire column C:C or to the range C1:C65536. However, an array can refer to the range C1:D65535 because the range is one row short of the maximum worksheet size and does not include the entire C or D column. Selected ranges 2,048 Arguments in a function 30 Nested levels of functions 7 Number of available worksheet functions 329 Earliest date allowed for calculation January 1, 1900 (January 1, 1904, if 1904 date system is used) Latest date allowed for calculation December 31, 9999 Largest amount of time that can be entered |
||
|
|
|
|
|
#6 |
|
Join Date: May 2003
Location: Katy, Texas
Posts: 3,829
|
Ahhh! Thanks again, Aladin, for your magic! Now I can't help but see it! But, why even use the BigNum? It seems a little troublesome to write in a formula. Why not just use LargeNum, defined as 9E+307 ? Wouldn't that large a number be a totally adequate and practical size to use for the cases in point? Or is it that it is imperitive to use the largest possible number allowed?
__________________
Ralph A. Esquivel, Excel 97 SR2 (Ver. 8.0), Windows XP, Home Edition, Service Pack 2, HP LaserJet 4L printer. |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 40,228
|
Quote:
9.99999999999999E+307 I don't see why to abolish a de facto consensus. It's mystifying and confusing to see so many variations, just because one needs once a while to type this big number. When it was suggested to invoke this constant as such instead of ever changing arbitrary big constants at the original MrExcel Board, I stopped posting variations ever since. |
|
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Dec 2003
Location: Oregon, USA
Posts: 9,631
|
Quote:
__________________
Regards, Zack Barresse All Excel Functions (If you would like comments in any code, please say so.) |
|
|
|
|
|
|
#9 |
|
Join Date: May 2003
Location: Katy, Texas
Posts: 3,829
|
I accept! What you are saying is, I guess, that BigNum is now a de facto standard in MrExcel. Well, that sounds, to me, as reason enough to maintain it as defined, and explains, at least to me, why you don't use 9E+307.
Of course, folks do say, "Rules are meant to be broken", "This is the exception that proves the rule", and, "Nothing is set in concrete" (and, I have seen badly-poured concrete torn up and repoured...).
__________________
Ralph A. Esquivel, Excel 97 SR2 (Ver. 8.0), Windows XP, Home Edition, Service Pack 2, HP LaserJet 4L printer. |
|
|
|
|
|
#10 | |
|
MrExcel MVP
Join Date: May 2002
Posts: 9,101
|
For a different take on the 'wisdom' of using this 9.however-many-9s-E-whatever approach see http://groups.google.com/groups?thre....microsoft.com
Quote:
__________________
Tushar Mehta (Microsoft MVP Excel 2000-2009) Excel & PowerPoint tutorials and add-ins; custom productivity solutions for MS Office |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|