Group:  Microsoft Word ยป microsoft.public.word.vba.beginners
Thread: named cell

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

named cell
Joanne <jobobbuss[ at ]sbcglobal.com> 27.07.2006 00:47:20
I have an embedded excel sheet in my word doc.
I wonder if I can name a cell (my totaling cell) in the excel
worksheet so that I can use it to update a field instead of hardcoding
an r1c1 addr that will change under various conditions? I've looked in
Word's format/cells, but it doesn't show anything about naming excel
cells.
Thanks
Joanne
Re: named cell
"Jean-Guy Marcil" <NoSpam[ at ]LeaveMeAlone> 27.07.2006 01:45:14
Joanne was telling us:
Joanne nous racontait que :

[Quoted Text]
> I have an embedded excel sheet in my word doc.
> I wonder if I can name a cell (my totaling cell) in the excel
> worksheet so that I can use it to update a field instead of hardcoding
> an r1c1 addr that will change under various conditions? I've looked in
> Word's format/cells, but it doesn't show anything about naming excel
> cells.

If you name the target cell in Excel, it will work as you want.

Let's say that I name my total cell in Excel "MyTotal" (on Sheet2)

Now, I select that cell and do CTRL-C (Copy)
I go to Word and do: Edit > Paste Special > Paste Links > Formatted Text
(RTF) and hit OK.

I get a field that contains the following code (Select the linked total and
do SHIFT-F9):
LINK Excel.Sheet.8 Book1 Sheet2!MyTotal \a \f 4 \r

Now if I move the "MyTotal" in Excel, Word will always find it, unless you
move to a new sheet, in which case you will have to edit the field code to
let Word know what sheet "MyTotal" is now on.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE[ at ]CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org


Re: named cell
Joanne <jobobbuss[ at ]sbcglobal.com> 27.07.2006 11:07:39
Thanks for your reply Jean-Guy
Are you telling me that before I embed an excel worksheet in my word
doc I should create it first in excel and get it formatted etc, then
embed it into my word doc.
I didn't do that - I just used Insert>object and created the worksheet
right there in word - which does not give me all the flexibility to
format as excel does.
Joanne

Jean-Guy Marcil wrote:

[Quoted Text]
>Joanne was telling us:
>Joanne nous racontait que :
>
>> I have an embedded excel sheet in my word doc.
>> I wonder if I can name a cell (my totaling cell) in the excel
>> worksheet so that I can use it to update a field instead of hardcoding
>> an r1c1 addr that will change under various conditions? I've looked in
>> Word's format/cells, but it doesn't show anything about naming excel
>> cells.
>
>If you name the target cell in Excel, it will work as you want.
>
>Let's say that I name my total cell in Excel "MyTotal" (on Sheet2)
>
>Now, I select that cell and do CTRL-C (Copy)
>I go to Word and do: Edit > Paste Special > Paste Links > Formatted Text
>(RTF) and hit OK.
>
>I get a field that contains the following code (Select the linked total and
>do SHIFT-F9):
> LINK Excel.Sheet.8 Book1 Sheet2!MyTotal \a \f 4 \r
>
>Now if I move the "MyTotal" in Excel, Word will always find it, unless you
>move to a new sheet, in which case you will have to edit the field code to
>let Word know what sheet "MyTotal" is now on.
>


Re: named cell
"Jean-Guy Marcil" <NoSpam[ at ]LeaveMeAlone> 27.07.2006 12:43:57
Joanne was telling us:
Joanne nous racontait que :

[Quoted Text]
> Thanks for your reply Jean-Guy
> Are you telling me that before I embed an excel worksheet in my word
> doc I should create it first in excel and get it formatted etc, then
> embed it into my word doc.
> I didn't do that - I just used Insert>object and created the worksheet
> right there in word - which does not give me all the flexibility to
> format as excel does.

Sorry, I missed the "embedded" part.

As Jezebel mentioned in the other group (by the way, it is bad "netiquette"
to multi-post in the same question in many groups...) if it is embedded,
when you edit it, the Word toolbar will become an Excel toolbar, so you can
name any cells or range of cell you want, as you would if you were in Excel.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE[ at ]CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net