PC Review


Reply
Thread Tools Rate Thread

Automation using IF statements

 
 
=?Utf-8?B?SktlZWY=?=
Guest
Posts: n/a
 
      1st Oct 2007
I am trying to do an IF statement and it is not working.
If text76= "" Text10 Text76- it returns the bookmark name Text76 not the
information contained in the cell. Any suggestions?
 
Reply With Quote
 
 
 
 
Jay Freedman
Guest
Posts: n/a
 
      2nd Oct 2007
On Mon, 1 Oct 2007 14:14:00 -0700, JKeef
<(E-Mail Removed)> wrote:

>I am trying to do an IF statement and it is not working.
>If text76= "" Text10 Text76- it returns the bookmark name Text76 not the
>information contained in the cell. Any suggestions?


You need to convert each of the bookmark names into a field (actually
a Ref field, but the keyword Ref is optional) nested inside the IF
field.

Select each bookmark name in turn, and press Ctrl+F9. The final
result, before collapsing the field code, should look like

{If {text76} = "" {Text10} {Text76}}

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
 
Reply With Quote
 
=?Utf-8?B?SktlZWY=?=
Guest
Posts: n/a
 
      2nd Oct 2007
Thanks Jay, by saying I need to convert each of the bookmark names into a
field- I assumed when I created the text form field originally, they already
were fields?
I typed in your formula and received the results {Text10}?
Am I missing a step?
Thanks again

"Jay Freedman" wrote:

> On Mon, 1 Oct 2007 14:14:00 -0700, JKeef
> <(E-Mail Removed)> wrote:
>
> >I am trying to do an IF statement and it is not working.
> >If text76= "" Text10 Text76- it returns the bookmark name Text76 not the
> >information contained in the cell. Any suggestions?

>
> You need to convert each of the bookmark names into a field (actually
> a Ref field, but the keyword Ref is optional) nested inside the IF
> field.
>
> Select each bookmark name in turn, and press Ctrl+F9. The final
> result, before collapsing the field code, should look like
>
> {If {text76} = "" {Text10} {Text76}}
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
>

 
Reply With Quote
 
Jay Freedman
Guest
Posts: n/a
 
      2nd Oct 2007
In the formula within the IF field, you cannot just type braces around a
bookmark name; you must select the name and press Ctrl+F9. The result of
that is a field within the IF field. Although the field delimiters look like
bold braces, they're something completely different.

JKeef wrote:
> Thanks Jay, by saying I need to convert each of the bookmark names
> into a field- I assumed when I created the text form field
> originally, they already were fields?
> I typed in your formula and received the results {Text10}?
> Am I missing a step?
> Thanks again
>
> "Jay Freedman" wrote:
>
>> On Mon, 1 Oct 2007 14:14:00 -0700, JKeef
>> <(E-Mail Removed)> wrote:
>>
>>> I am trying to do an IF statement and it is not working.
>>> If text76= "" Text10 Text76- it returns the bookmark name Text76
>>> not the information contained in the cell. Any suggestions?

>>
>> You need to convert each of the bookmark names into a field (actually
>> a Ref field, but the keyword Ref is optional) nested inside the IF
>> field.
>>
>> Select each bookmark name in turn, and press Ctrl+F9. The final
>> result, before collapsing the field code, should look like
>>
>> {If {text76} = "" {Text10} {Text76}}
>>
>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP FAQ: http://word.mvps.org
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.



 
Reply With Quote
 
=?Utf-8?B?SktlZWY=?=
Guest
Posts: n/a
 
      2nd Oct 2007
Boy, Thanks Jay- the Text76 has turned into the actual results- I have
inserted all of the REF fields using Ctrl F9 then typing their name in the
brackets (or through the field option choose REF- select bookmark Text10).
But now my if statement doesn't work? I get text76 results or nothing.
{ IF { text76 } = "" {Text10) {Text76}

Thank you again for all of your time!

"Jay Freedman" wrote:

> In the formula within the IF field, you cannot just type braces around a
> bookmark name; you must select the name and press Ctrl+F9. The result of
> that is a field within the IF field. Although the field delimiters look like
> bold braces, they're something completely different.
>
> JKeef wrote:
> > Thanks Jay, by saying I need to convert each of the bookmark names
> > into a field- I assumed when I created the text form field
> > originally, they already were fields?
> > I typed in your formula and received the results {Text10}?
> > Am I missing a step?
> > Thanks again
> >
> > "Jay Freedman" wrote:
> >
> >> On Mon, 1 Oct 2007 14:14:00 -0700, JKeef
> >> <(E-Mail Removed)> wrote:
> >>
> >>> I am trying to do an IF statement and it is not working.
> >>> If text76= "" Text10 Text76- it returns the bookmark name Text76
> >>> not the information contained in the cell. Any suggestions?
> >>
> >> You need to convert each of the bookmark names into a field (actually
> >> a Ref field, but the keyword Ref is optional) nested inside the IF
> >> field.
> >>
> >> Select each bookmark name in turn, and press Ctrl+F9. The final
> >> result, before collapsing the field code, should look like
> >>
> >> {If {text76} = "" {Text10} {Text76}}
> >>
> >> --
> >> Regards,
> >> Jay Freedman
> >> Microsoft Word MVP FAQ: http://word.mvps.org
> >> Email cannot be acknowledged; please post all follow-ups to the
> >> newsgroup so all may benefit.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?SktlZWY=?=
Guest
Posts: n/a
 
      2nd Oct 2007
Hi Jay-
I figured out a work around. For whatever reason- it does not like the "" or
" " sign. So I built the IF statement around a dropdown box.
Again- thank you for your help!

"JKeef" wrote:

> Boy, Thanks Jay- the Text76 has turned into the actual results- I have
> inserted all of the REF fields using Ctrl F9 then typing their name in the
> brackets (or through the field option choose REF- select bookmark Text10).
> But now my if statement doesn't work? I get text76 results or nothing.
> { IF { text76 } = "" {Text10) {Text76}
>
> Thank you again for all of your time!
>
> "Jay Freedman" wrote:
>
> > In the formula within the IF field, you cannot just type braces around a
> > bookmark name; you must select the name and press Ctrl+F9. The result of
> > that is a field within the IF field. Although the field delimiters look like
> > bold braces, they're something completely different.
> >
> > JKeef wrote:
> > > Thanks Jay, by saying I need to convert each of the bookmark names
> > > into a field- I assumed when I created the text form field
> > > originally, they already were fields?
> > > I typed in your formula and received the results {Text10}?
> > > Am I missing a step?
> > > Thanks again
> > >
> > > "Jay Freedman" wrote:
> > >
> > >> On Mon, 1 Oct 2007 14:14:00 -0700, JKeef
> > >> <(E-Mail Removed)> wrote:
> > >>
> > >>> I am trying to do an IF statement and it is not working.
> > >>> If text76= "" Text10 Text76- it returns the bookmark name Text76
> > >>> not the information contained in the cell. Any suggestions?
> > >>
> > >> You need to convert each of the bookmark names into a field (actually
> > >> a Ref field, but the keyword Ref is optional) nested inside the IF
> > >> field.
> > >>
> > >> Select each bookmark name in turn, and press Ctrl+F9. The final
> > >> result, before collapsing the field code, should look like
> > >>
> > >> {If {text76} = "" {Text10} {Text76}}
> > >>
> > >> --
> > >> Regards,
> > >> Jay Freedman
> > >> Microsoft Word MVP FAQ: http://word.mvps.org
> > >> Email cannot be acknowledged; please post all follow-ups to the
> > >> newsgroup so all may benefit.

> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access automation leaves Excel open which in turn locks 2nd automation attempts EagleOne@discussions.microsoft.com Microsoft Access 8 30th Jun 2008 01:27 AM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft VB .NET 1 23rd Jul 2007 10:45 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft ASP .NET 0 19th Jul 2007 10:10 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft Excel Programming 0 19th Jul 2007 10:10 PM
operator statements, shorting when reusing one of the statements? KR Microsoft Excel Programming 1 4th Aug 2005 06:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:47 PM.