Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Differentiating alphanumerics in an "IF" field
I want to merge different statements from data in a field such as "5a" "5b"
and "5c" but the IF THEN function is treating them all as just a plain old "5" and inserting all three of the relating comments. Any ideas how to get it to treat tham as different pieces of data? |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Differentiating alphanumerics in an "IF" field
You cannot merge only part of a field in Word.
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org James Markham wrote: I want to merge different statements from data in a field such as "5a" "5b" and "5c" but the IF THEN function is treating them all as just a plain old "5" and inserting all three of the relating comments. Any ideas how to get it to treat tham as different pieces of data? |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Differentiating alphanumerics in an "IF" field
Thanks for the response, but I don't think that's what I'm trying to do. I
also don't think I phrased my question very well - I was trying to be brief, but I guess that doesn't always help! As an overview: I am trying to write school reports which generate a written comment based on an existing piece of assessment data. Let me show an example of what I'm trying to do: { IF {MERGEFILED Electronics Level} = 6c "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit. } { IF {MERGEFILED Electronics Level} = 5a To follow instructions well to produce a Printed Circuit Board and populate it with components to create a timer circuit. } { IF {MERGEFILED Electronics Level} = 5b To produce a Printed Circuit Board with assistance and populate it with components to create a timer circuit. } and so on. In the past when the assessment data in the "Electronics Level" field was just a number (i.e. "5" or "6" etc.) it worked like a dream. My problem is that the data is now entered with three sub-levels as an alphanumeric (i.e. "5a" "5b" "5c" "6a" "6b" "6c" etc.) and if a student has say a level "5b" the mailmerge is inserting the comments for "5a" and "5c" too. Can I get it to recognise that "5a" is not the same data as "5b"? Did that make more sense? "Graham Mayor" wrote: You cannot merge only part of a field in Word. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org James Markham wrote: I want to merge different statements from data in a field such as "5a" "5b" and "5c" but the IF THEN function is treating them all as just a plain old "5" and inserting all three of the relating comments. Any ideas how to get it to treat tham as different pieces of data? |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Differentiating alphanumerics in an "IF" field
Hi James,
Are *all* your field braces (ie '{}') created via Ctrl-F9? Also, you have a typo (MERGEFILED instead of MERGEFIELD). The following should work: {IF{MERGEFIELD Electronics Level}= "6c" "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit."} {IF{MERGEFIELD Electronics Level}= "5a" "To follow instructions well to produce a Printed Circuit Board and populate it with components to create a timer circuit."} {IF{MERGEFIELD Electronics Level}= "5b" "To produce a Printed Circuit Board with assistance and populate it with components to create a timer circuit."} etc. -- Cheers macropod [MVP - Microsoft Word] "James Markham" wrote in message ... Thanks for the response, but I don't think that's what I'm trying to do. I also don't think I phrased my question very well - I was trying to be brief, but I guess that doesn't always help! As an overview: I am trying to write school reports which generate a written comment based on an existing piece of assessment data. Let me show an example of what I'm trying to do: { IF {MERGEFILED Electronics Level} = 6c "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit. } { IF {MERGEFILED Electronics Level} = 5a To follow instructions well to produce a Printed Circuit Board and populate it with components to create a timer circuit. } { IF {MERGEFILED Electronics Level} = 5b To produce a Printed Circuit Board with assistance and populate it with components to create a timer circuit. } and so on. In the past when the assessment data in the "Electronics Level" field was just a number (i.e. "5" or "6" etc.) it worked like a dream. My problem is that the data is now entered with three sub-levels as an alphanumeric (i.e. "5a" "5b" "5c" "6a" "6b" "6c" etc.) and if a student has say a level "5b" the mailmerge is inserting the comments for "5a" and "5c" too. Can I get it to recognise that "5a" is not the same data as "5b"? Did that make more sense? "Graham Mayor" wrote: You cannot merge only part of a field in Word. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org James Markham wrote: I want to merge different statements from data in a field such as "5a" "5b" and "5c" but the IF THEN function is treating them all as just a plain old "5" and inserting all three of the relating comments. Any ideas how to get it to treat tham as different pieces of data? |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Differentiating alphanumerics in an "IF" field
You need to quote the MERGEFIELD (and the field name if it has spaces), e.g.
{ IF "{ MERGEFIELD "Electronics Level" }" = 6c "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit. } I believe that in this particular case, because the mergefield value starts with something that looks like a number, the comparison is actually numeric, despite the quotes around the second comparand. Peter Jamieson http://tips.pjmsn.me.uk James Markham wrote: Thanks for the response, but I don't think that's what I'm trying to do. I also don't think I phrased my question very well - I was trying to be brief, but I guess that doesn't always help! As an overview: I am trying to write school reports which generate a written comment based on an existing piece of assessment data. Let me show an example of what I'm trying to do: { IF {MERGEFILED Electronics Level} = 6c "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit. } { IF {MERGEFILED Electronics Level} = 5a To follow instructions well to produce a Printed Circuit Board and populate it with components to create a timer circuit. } { IF {MERGEFILED Electronics Level} = 5b To produce a Printed Circuit Board with assistance and populate it with components to create a timer circuit. } and so on. In the past when the assessment data in the "Electronics Level" field was just a number (i.e. "5" or "6" etc.) it worked like a dream. My problem is that the data is now entered with three sub-levels as an alphanumeric (i.e. "5a" "5b" "5c" "6a" "6b" "6c" etc.) and if a student has say a level "5b" the mailmerge is inserting the comments for "5a" and "5c" too. Can I get it to recognise that "5a" is not the same data as "5b"? Did that make more sense? "Graham Mayor" wrote: You cannot merge only part of a field in Word. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org James Markham wrote: I want to merge different statements from data in a field such as "5a" "5b" and "5c" but the IF THEN function is treating them all as just a plain old "5" and inserting all three of the relating comments. Any ideas how to get it to treat tham as different pieces of data? |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Differentiating alphanumerics in an "IF" field
Many Thanks Peter. Simply putting quotes around "{ MERGEFIELD "Electronics
Level" }" made the whole thing work perfectly! "Peter Jamieson" wrote: You need to quote the MERGEFIELD (and the field name if it has spaces), e.g. { IF "{ MERGEFIELD "Electronics Level" }" = 6c "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit. } I believe that in this particular case, because the mergefield value starts with something that looks like a number, the comparison is actually numeric, despite the quotes around the second comparand. Peter Jamieson http://tips.pjmsn.me.uk James Markham wrote: Thanks for the response, but I don't think that's what I'm trying to do. I also don't think I phrased my question very well - I was trying to be brief, but I guess that doesn't always help! As an overview: I am trying to write school reports which generate a written comment based on an existing piece of assessment data. Let me show an example of what I'm trying to do: { IF {MERGEFILED Electronics Level} = 6c "To use knowledge and understanding of Printed Circuit Boards to design and develop an individual timer circuit. } { IF {MERGEFILED Electronics Level} = 5a To follow instructions well to produce a Printed Circuit Board and populate it with components to create a timer circuit. } { IF {MERGEFILED Electronics Level} = 5b To produce a Printed Circuit Board with assistance and populate it with components to create a timer circuit. } and so on. In the past when the assessment data in the "Electronics Level" field was just a number (i.e. "5" or "6" etc.) it worked like a dream. My problem is that the data is now entered with three sub-levels as an alphanumeric (i.e. "5a" "5b" "5c" "6a" "6b" "6c" etc.) and if a student has say a level "5b" the mailmerge is inserting the comments for "5a" and "5c" too. Can I get it to recognise that "5a" is not the same data as "5b"? Did that make more sense? "Graham Mayor" wrote: You cannot merge only part of a field in Word. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org James Markham wrote: I want to merge different statements from data in a field such as "5a" "5b" and "5c" but the IF THEN function is treating them all as just a plain old "5" and inserting all three of the relating comments. Any ideas how to get it to treat tham as different pieces of data? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I set up a "expand/collapse" or "show/hide" field in Word | Microsoft Word Help | |||
"Print current page" should have a "+n pages" field. | Microsoft Word Help | |||
"h" and "t" allowed in form Number field | Microsoft Word Help | |||
New field for Word: {SCREENTIP "DisplayText" "TipText"} | Microsoft Word Help | |||
In a Fillin Field, how do I get "th" or "rd" to be in superscript? | Microsoft Word Help |