Bookmark Name Bug? (Word 2000 SR-1)

Hi All:
I wonder if someone could verify something regarding bookmark names & formulas. I get the same results in Word 2000 & 97. Dave Rado, MVP, has an article about summing columns of figures in a table where there are blanks.

Essentially, the method is to bookmark the table, put the total cell in another table, & then reference the bookmark in the total calculation. e.g. If you have a table with numbers in the third column (column C) & give the table the bookmark name "Table1", you get the result using this formula:

{=SUM(Table1 C:C)}

I find that you get a syntax error if the bookmark name contains less than 3 letters & ends with one or more numbers. e.g. T1 or TA1 won't work in a formula, even though the bookmark names are otherwise valid. You can place T1 or TA1 in a {REF} field with no problem. You can use T or TA as a bookmark name in a formula with no problem. I can find nothing in the Knowledge Base regarding this.

1. Would someone please verify that I'm correct in this?
2. If so, any idea why you must use at least 3 letters to a bookmark name before you can use numbers when you're using a formula?

Re: Bookmark Name Bug? (Word 2000 SR-1)

Phil,

I think David Grugeon hit it. But I tried a little more experimenting.

Not sure why Dave Rado suggests putting the formula in another table (but there must be something to do with the blanks?). But you could put the formula in the same table as the cells to be added. So the full syntax would be something like:
{ =SUM(bookmarked-table cell-range) }

where the bookmarked-table is OPTIONAL. If you have the formula in the same table, this is not needed but you could include it. If you have the formula in a different table, you MUST have it.

Further, the cell range could be as simple as just 1 cell (not clear why you'd go thru the trouble of creating a formula to sum 1 cell instead of just referring to it, but you can). So something like

{ =SUM(c1) }

is valid. But you must have a col/row reference - something like

{ =SUMę }

would not be valid (if you wanted this in place of c:c for the entire col).

So as DG surmised, a bookmark like TA or TA1 may look too much like a cell reference. Since the bookmarked-table is optional, the parser is probably treating TA or TA1 as a col or col/row ref within the 2nd table. TA is invalid altogether, as mentioned, and TA, while valid as a col/row ref, is invalid when followed by a space.

Re: Bookmark Name Bug? (Word 2000 SR-1)

Hi Fred:

I agree that David nailed it. The reason Dave Rado suggests another table is that if you have the sum formula in the last row & you may have blank cells in the column to be summed & you may need to add or delete rows.

It's really ingenious!. To a user, they can keep adding rows by using the tab key (since it's a separate table). Blank cells mean that you can't use {sum(above)}, variable rows mean you can't specify a range other than B:B (for column [img]/forums/images/smilies/cool.gif[/img], & using {sum B:B} is circular (every time you press F9, it adds its own previous total to the total).

Re: Bookmark Name Bug? (Word 2000 SR-1)

Phil,

I really do agree that putting the sum in a separate table is the best way to go, for all the reasons you mentioned. Another benefit is that you could hide the first table and just print the second table with the sum.

But the flexibility comes at the expense of exactly the kind of problem you ran into. The syntax that you need to use, as I discussed, requires you to do something different when naming bookmarks. If it had been me, I would not have allowed bookmarks to be less than 4 characters. That way, you wouldn't have to worry if your bookmark was used for a table or a non-table.