A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"defined" function



 
 
Thread Tools Display Modes
  #1  
Old November 16th, 2004, 03:32 PM
Monika Krug
external usenet poster
 
Posts: n/a
Default "defined" function

How is the "defined" function for the formula field
working?

I tried { = defined ( { Mergefield x } ) } .

This does print 1 when x is a valid mail merge field, but
when it is not, it does not print 0, but "syntax error"
instead.

TIA,
Monika.
  #2  
Old November 16th, 2004, 04:12 PM
Peter Jamieson
external usenet poster
 
Posts: n/a
Default

As far as I know, defined() expects a numeric argument and is really there
to trap divide-by-0 and overflow errors, not "exists" type errors.

I don't think there is a field that will usefully tell you whether a
particular mergefield name is valid or not - you would probably have to use
VBA prior to the merge to do that.

Peter Jamieson
"Monika Krug" wrote in message
...
How is the "defined" function for the formula field
working?

I tried { = defined ( { Mergefield x } ) } .

This does print 1 when x is a valid mail merge field, but
when it is not, it does not print 0, but "syntax error"
instead.

TIA,
Monika.


  #3  
Old November 16th, 2004, 05:07 PM
Monika Krug
external usenet poster
 
Posts: n/a
Default

"Peter Jamieson" wrote:

As far as I know, defined() expects a numeric argument

and is really there
to trap divide-by-0 and overflow errors, not "exists"

type errors.

I don't think there is a field that will usefully tell

you whether a
particular mergefield name is valid or not - you would

probably have to use
VBA prior to the merge to do that.

Peter Jamieson


Thank you for this clarification.

Regards,
Monika.
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What if the back-end "moves"? John S. Ford, MD General Discussion 13 November 15th, 2004 10:33 PM
Nesting Address function within Index function mserber General Discussion 3 November 5th, 2004 03:01 AM
UK postcode issue Lapchien Running & Setting Up Queries 6 June 11th, 2004 09:06 PM
Modify "Remove Dots" function Tom Bock Worksheet Functions 3 March 15th, 2004 10:28 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.