Hello and welcome to the forum!
One possible solution would be still capture the " (continued)..." part of the department name, but use a calculated field to strip it out when necessary.
I often find that it's easier to deal with things that you want to exclude by filtering them or using these types of calculations than fiddling endlessly with fancy traps.
Assuming that it literally is " (continued)..." that you don't want, I'd initially define the DeptName as PreDeptName, the create the DeptName calculated field with this formula:
[font="courier"]if(right(,15)=" (continued)...",left(,len()-15),[PreDeptName]) /font[/quote]This will strip the part you don't want (" (continued)...") from the field when it appears, but show the deparment name properly when it doesn't.
This will let you trap the longest possible department name and still get what you really want out of it.
Of course, as we often see with Monarch there are bound to be other possible solutions as well.
Edit: I see Todd beat me to it, and as I suspected offered a slightly different solution. If you find that you've got ( characters in the department names that really belong there like Department (Specialty), just split on "(continued)" instead.
The suggestion of the Lsplit did not work
Below is an example of my problem
The (continued) falls in different places depending on the length of the department name
I tried the Lsplit last nite and had the same thought... not sure why it won't work
DEPARTMENT: ULTRASOUND (Continued)
DEPARTMENT: BALANCE SHEET
DEPARTMENT: BALANCE SHEET (Continued)