Hi =?Utf-8?B?S2VsdmluIExlZQ==?=,
I got a table (column A, B and C) in MS Word file. Now I would like to format
exactly like excel do:
Column A is under time format (hh:mm) - "Time in", column B is "Time out",
and column C was the number of hour under general format which column B -
column A.
Well, since Word considers *everything* as text, it's rather difficult to get it
to work with times. Dates you can usually manage, but when you query a time
formatted as hh:mm in a table formula, Word will add the two halves of the time.
4:25 Word "sees" as 29, for example (4 + 29). I don't know of any way to change
this, short of embedding an Excel worksheet in your document, as Suzanne and
Steve advise.
Or you'd need a macro solution, that would have to be extremely sophisticated
if the calculations should be transparent for the user. Although, if this is
supposed to be a form for tracking work times or something like that, you could
consider using Form fields with macros.
Another 2 additional column; C and D. If C is "Accounts" then D will show
"Cindy" else "Lily" ...
Even though Word considers everything to be text, as soon as you reference a
table cell in a formula, if it finds text, it ignores it. This means the only
way to pick up the information for a comparison would be to bookmark it, then
query the bookmark content. While you can bookmark cells fairly easily, there's
no way to protect the bookmark from being deleted when the user TABs into the
cell and types. Here, again, you could accomplish what you're looking for
relatively easily with form fields and a macro. (Or a UserForm with a macro
would do the job.)
If you don't want that then, again, an embedded Excel worksheet would be the
only alternate approach.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail
