Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Question about IF & INCLUDETEXT with a number range
Me again. My merge questions just keep on coming.
I'm still working with IF and INCLUDETEXT statements to build admission letters for students. I'm working on a statement that looks at the admission average and determines which admission award to give. The first range of averages would be from 80.0-84.9%, then 85.0-89.9%, and then 90% and above. The averages reported appear in my gigantic (so gigantor I can't open it in Excel) csv file. Here's the kicker - the average can appear in one of six positions in the csv file. So I've got this so far: {if {mergefield admittype}="HS" {if {mergefield evalcmp111}="2010" {if {mergefield evalcmpvalue111}="80"{if {mergefield evalcmp111}="84.9"{includetext c:\\master_comment.doc admission_award}""}""}""}""} Which, naturally, isn't working when I test it...is it just my spacing? Is there a better way to do this? Thanks again for your help...it is greatly appreciated. Heather |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Question about IF & INCLUDETEXT with a number range
Squee! I answered my own question.
{if {mergefield admittype}="HS" {if {mergefield evalcmp111}="2010" {if {mergefield evalcmpvalue111}="80" {if {mergefield evalcmpvalue111}"85" {includetext c:\\master_comment.doc admission_award_80_to_84} ""} ""} ""} ""} ....with five more instances (using evalcmp111, 112, 113, etc) to account for each case of 80.0-84.9% average. And then rinse, repeat, and six more big IFs for the 85-89%. Is there any difference between entering 80.0 and 80? Go live is now in...8 days, 22 hours, 14 minutes. Me stressed? Noooooo... Heather Heather wrote: Me again. My merge questions just keep on coming. I'm still working with IF and INCLUDETEXT statements to build admission letters for students. I'm working on a statement that looks at the admission average and determines which admission award to give. The first range of averages would be from 80.0-84.9%, then 85.0-89.9%, and then 90% and above. The averages reported appear in my gigantic (so gigantor I can't open it in Excel) csv file. Here's the kicker - the average can appear in one of six positions in the csv file. So I've got this so far: {if {mergefield admittype}="HS" {if {mergefield evalcmp111}="2010" {if {mergefield evalcmpvalue111}="80"{if {mergefield evalcmp111}="84.9"{includetext c:\\master_comment.doc admission_award}""}""}""}""} Which, naturally, isn't working when I test it...is it just my spacing? Is there a better way to do this? Thanks again for your help...it is greatly appreciated. Heather |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Question about IF & INCLUDETEXT with a number range
Is there any difference between entering 80.0 and 80?
Maybe - tests in IF fields tend to be textual rather than numeric, especially if you quote the second comparand. In this case it may work whatever the value, but if you test and discover that isn't so, you may be able to use { = } field to do the comparison. Personally, I would double quote text operands. Some programmers seem to tegard them as redundant because the IF typically works without them, but they are not - in some circumstances behaviour is different when you leave them out. But the following is mainly just my personal preference (the line breaks and spacing on the left hand side of the lines are just for presentation purposes): { IF "{MERGEFIELD admittype }" = "HS" "{ IF "{ MERGEFIELD evalcmp111 }" = "2010" "{ IF "{ MERGEFIELD evalcmpvalue111 }" = "80" "{ IF "{ MERGEFIELD evalcmpvalue111 }" "85" "{ INCLUDETEXT "c:\\master_comment.doc" admission_award_80_to_84}" "" }" "" }" "" }" "" } Peter Jamieson "Heather" wrote in message oups.com... Squee! I answered my own question. {if {mergefield admittype}="HS" {if {mergefield evalcmp111}="2010" {if {mergefield evalcmpvalue111}="80" {if {mergefield evalcmpvalue111}"85" {includetext c:\\master_comment.doc admission_award_80_to_84} ""} ""} ""} ""} ...with five more instances (using evalcmp111, 112, 113, etc) to account for each case of 80.0-84.9% average. And then rinse, repeat, and six more big IFs for the 85-89%. Is there any difference between entering 80.0 and 80? Go live is now in...8 days, 22 hours, 14 minutes. Me stressed? Noooooo... Heather Heather wrote: Me again. My merge questions just keep on coming. I'm still working with IF and INCLUDETEXT statements to build admission letters for students. I'm working on a statement that looks at the admission average and determines which admission award to give. The first range of averages would be from 80.0-84.9%, then 85.0-89.9%, and then 90% and above. The averages reported appear in my gigantic (so gigantor I can't open it in Excel) csv file. Here's the kicker - the average can appear in one of six positions in the csv file. So I've got this so far: {if {mergefield admittype}="HS" {if {mergefield evalcmp111}="2010" {if {mergefield evalcmpvalue111}="80"{if {mergefield evalcmp111}="84.9"{includetext c:\\master_comment.doc admission_award}""}""}""}""} Which, naturally, isn't working when I test it...is it just my spacing? Is there a better way to do this? Thanks again for your help...it is greatly appreciated. Heather |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
page number positioning and format | Page Layout | |||
VBA: For Each Cell in Range jumps out of range? | Tables | |||
Is there a limit of words you can put in tables? | Tables | |||
Consecutive number question | Mailmerge | |||
Maximum number of pages in a word document | Formatting Long Documents |