Hi, I have ad a good look around and as I can't find anything about this I assume it can't be done - but I live in hope. I currently have the following statment:
{If{Mergefield "PE"}="M11" "monday" {If Mergefield "PE"}="M12" "tuesday" If{Mergefield "PE"}="M13 "wednesday" {If{Mergefield "PE"}="M14 "thursday "friday"}}}}
This works perfectly, but - the idea is to calculate the day from the last number in this code and these codes run in four week cycles - and may start with four other letter codes. So to cover every option the forumla will have to be much longer. To be tidy I want to say look at the right hand digit - then I can just nest my IF statement for 1-5.
but whatever syntax I use gets an error - can anyone help me write this right:
{If RIGHT({Mergefield "PE"},1)="5" "friday" {if RIGHT ({Mergefield "PE"},1)="4" "thursday" }} etc etc
Please note I do know how to do this in excel and access - but this data is coming from a system written in sculptor which I cannot touch so my only option is to deal with it once it is merged with word.
Many thanks
CB
{If{Mergefield "PE"}="M11" "monday" {If Mergefield "PE"}="M12" "tuesday" If{Mergefield "PE"}="M13 "wednesday" {If{Mergefield "PE"}="M14 "thursday "friday"}}}}
This works perfectly, but - the idea is to calculate the day from the last number in this code and these codes run in four week cycles - and may start with four other letter codes. So to cover every option the forumla will have to be much longer. To be tidy I want to say look at the right hand digit - then I can just nest my IF statement for 1-5.
but whatever syntax I use gets an error - can anyone help me write this right:
{If RIGHT({Mergefield "PE"},1)="5" "friday" {if RIGHT ({Mergefield "PE"},1)="4" "thursday" }} etc etc
Please note I do know how to do this in excel and access - but this data is coming from a system written in sculptor which I cannot touch so my only option is to deal with it once it is merged with word.
Many thanks
CB