#1   Report Post  
ArtHendrickson
 
Posts: n/a
Default Excel CELL bug


Back in Apr 13 2004, 10basetom posted about what he believed to be a
flaw with the Excel function CELL. The replies corrected that belief. I
believe that I have found a bug with CELL. I'm using Excel 2000
(9.0.6926 SP-3).

Create a one-worksheet workbook. Name the worksheet George and save the
workbook as George--the same name as the one worksheet. Now enter =CELL("filename",A1) into any cell. My results are not as expected. The workbook name is not
surrounded by brackets and the worksheet name is missing.

Either, change the name of the workbook, the worksheet, or add another
worksheet and then the results are as expected.

Does this error exist in later versions of Excel?

Art H


--
ArtHendrickson
------------------------------------------------------------------------
ArtHendrickson's Profile: http://www.excelforum.com/member.php...o&userid=28755
View this thread: http://www.excelforum.com/showthread...hreadid=484460

  #2   Report Post  
Roland
 
Posts: n/a
Default Excel CELL bug

Excel 2002 works just as you've described for Excel 2000.

"ArtHendrickson" wrote:


Back in Apr 13 2004, 10basetom posted about what he believed to be a
flaw with the Excel function CELL. The replies corrected that belief. I
believe that I have found a bug with CELL. I'm using Excel 2000
(9.0.6926 SP-3).

Create a one-worksheet workbook. Name the worksheet George and save the
workbook as George--the same name as the one worksheet. Now enter =CELL("filename",A1) into any cell. My results are not as expected. The workbook name is not
surrounded by brackets and the worksheet name is missing.

Either, change the name of the workbook, the worksheet, or add another
worksheet and then the results are as expected.

Does this error exist in later versions of Excel?

Art H


--
ArtHendrickson
------------------------------------------------------------------------
ArtHendrickson's Profile: http://www.excelforum.com/member.php...o&userid=28755
View this thread: http://www.excelforum.com/showthread...hreadid=484460


  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default Excel CELL bug

"ArtHendrickson" wrote...
....
Create a one-worksheet workbook. Name the worksheet George and save the
workbook as George--the same name as the one worksheet. Now enter
=CELL("filename",A1) into any cell. My results are not as expected. The
workbook name is not surrounded by brackets and the worksheet name is
missing.

....

This is *not* a bug, though it's inadequately documented (as is so much
else). This is for backward compatibility with Excel 4 and prior in which
..XLS files could only contain a single worksheet. [Excel 4 provided .XLW
workbooks which could contain several virtual .XLS files.] If you save a
single worksheet file in XL2, XL3 or XL4 .XLS formats, the single worksheet
in such files will have the same name as the as the workbook's base filename
(i.e., without the .XLS extension). The syntax for external references in
those old versions was 'filename.xls'!Address, and that's what all versions
of Excel up to Excel 2003 (Windows) and Excel 2004 (Mac) will use when
referring to such workbooks. Further, workbook-level names are also given in
the same syntax, e.g., 'filename.xls'!DefinedName.

This is Excel's (perverse) external reference syntax. There's nothing to
'fix' (Microsoft has a demonstrated tendency not to change poor syntax).

On a tangent: Excel's external referencing syntax is VERY BADLY DESIGNED.
Square brackets and parentheses are legal characters in Windows and MacOS
filenames, so while Excel may object to saving files with these characters
in their filenames, nothing prevents users from renaming them with such
characters in the OS.

The problem this raises, which *IS* a bug in Excel (or a more thoroughly
stupid design decision than the external reference syntax), is that Excel
will open files with these characters in the base filename. Excel then mungs
the filenames in memory.

Save an .XLS file. Rename it [foo].xls and make a copy of it named
(foo).xls. Open (foo).xls first. Excel will show it's name as (foo).xls. Now
open [foo].xls, and Excel will show this second file's name as (foo).xls as
well. So Excel can be fooled into having two files open in memory at the
same time with what it believes are the same filenames. If you then use
Point mode to refer to a cell in [foo].xls, Excel will happily return a
reference to the corresponding range in (foo).xls.

Microsoft *should* reprogram Excel so that it won't open any file if it
contains characters in the base filename that Excel won't permit when saving
the file. Then it should eliminate the code that converts square brackets in
base filenames into parentheses. However, Microsoft is impervious to matters
of 'should' and 'ought', so this is unlikely ever to be fixed.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell on one page equals cell on another page in excel? toswald Excel Worksheet Functions 1 September 26th 05 08:52 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
How Can I make a cell flash in Excel monir Excel Discussion (Misc queries) 0 February 4th 05 03:41 AM
Excel: how to formulate conditional cell references centraloffice Excel Worksheet Functions 1 December 10th 04 08:57 PM
Paste rows of numbers from Word into single Excel cell BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM


All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"