Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF statement problem
I am writing a mail merge project to create a number of invoices from a
database created in access. I need to check a number that I obtained using a count statement to see if it is between certain boundaries. When I try to do this it does not work and the else staement is always executed. It may be because the number is stored as text but even direct comparison doesn't work. Also I need to round a number down to the nearest 0.01(its a price). Does anyone know how to achieve this? Thanks in advance, S |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF statement problem
What does the code in your IF field look like at the moment?
Also I need to round a number down to the nearest 0.01(its a price). Does Have you tried the usualy formatting switches, or is the problem rounding rather than truncation? -- Peter Jamieson http://tips.pjmsn.me.uk "projectmergeleader" wrote in message ... I am writing a mail merge project to create a number of invoices from a database created in access. I need to check a number that I obtained using a count statement to see if it is between certain boundaries. When I try to do this it does not work and the else staement is always executed. It may be because the number is stored as text but even direct comparison doesn't work. Also I need to round a number down to the nearest 0.01(its a price). Does anyone know how to achieve this? Thanks in advance, S |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF statement problem
I am a fool the reason it wasn't working was that that it went
{IF {{MERGEFIELD"CountOfMessage"}} = 500 ^^ too many brackets Regarding my other problem it is a rounding problem but since it is going to be rounded down it could be truncated. I just don't know how to do it. Also I need to add digits to some numbers, for example, if i have 2 i need 2.00. Maybe this could be done with truncation as well. Thanks, S "Peter Jamieson" wrote: What does the code in your IF field look like at the moment? Also I need to round a number down to the nearest 0.01(its a price). Does Have you tried the usualy formatting switches, or is the problem rounding rather than truncation? -- Peter Jamieson http://tips.pjmsn.me.uk "projectmergeleader" wrote in message ... I am writing a mail merge project to create a number of invoices from a database created in access. I need to check a number that I obtained using a count statement to see if it is between certain boundaries. When I try to do this it does not work and the else staement is always executed. It may be because the number is stored as text but even direct comparison doesn't work. Also I need to round a number down to the nearest 0.01(its a price). Does anyone know how to achieve this? Thanks in advance, S |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF statement problem
Instead of
{ MERGEFIELD mynumber } try { MERGEFIELD mynumber \#0.00 } -- Peter Jamieson http://tips.pjmsn.me.uk "projectmergeleader" wrote in message ... I am a fool the reason it wasn't working was that that it went {IF {{MERGEFIELD"CountOfMessage"}} = 500 ^^ too many brackets Regarding my other problem it is a rounding problem but since it is going to be rounded down it could be truncated. I just don't know how to do it. Also I need to add digits to some numbers, for example, if i have 2 i need 2.00. Maybe this could be done with truncation as well. Thanks, S "Peter Jamieson" wrote: What does the code in your IF field look like at the moment? Also I need to round a number down to the nearest 0.01(its a price). Does Have you tried the usualy formatting switches, or is the problem rounding rather than truncation? -- Peter Jamieson http://tips.pjmsn.me.uk "projectmergeleader" wrote in message ... I am writing a mail merge project to create a number of invoices from a database created in access. I need to check a number that I obtained using a count statement to see if it is between certain boundaries. When I try to do this it does not work and the else staement is always executed. It may be because the number is stored as text but even direct comparison doesn't work. Also I need to round a number down to the nearest 0.01(its a price). Does anyone know how to achieve this? Thanks in advance, S |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement | Microsoft Word Help | |||
which statement right , question is Choose the correct statement? | Microsoft Word Help | |||
which statement right , question isChoose the correct statement? | Microsoft Word Help | |||
problem with if statement | Microsoft Word Help | |||
IF statement problem !Syntax Error, ! | Microsoft Word Help |