# Thread: Expression Character Limitation (03)

1. ## Expression Character Limitation (03)

Is there a limitation as to the number of characters one can have in an expression?

The reason I ask is that I receive this error message when I add another line to the expression.

Thanks,
John

2. ## Re: Expression Character Limitation (03)

Expressions can become quite long, but we'd need to know the details before we can say more about it.

3. ## Re: Expression Character Limitation (03)

Hans,

Here is an example of the expression:

BS2: IIf([Account]>=4255 And [Account]<=4285,4290,
IIf([Account]=4295 And [Account]=4295,4295,
IIf([Account]>=4305 And [Account]<=4310,4315,
IIf([Account]>=4335 And [Account]<=4340,4345,
IIf([Account]>=4355 And [Account]<=4360,4365,
IIf([Account]>=4375 And [Account]<=4380,4385,
IIf([Account]>=4395 And [Account]<=4400,4405,
IIf([Account]=4415 And [Account]=4415,4415,
IIf([Account]=4425 And [Account]=4425,4425,
IIf([Account]=4435 And [Account]=4435,4435,
IIf([Account]>=4445 And [Account]<=4455,4460,
IIf([Account]>=4505 And [Account]<=4625,4630,
IIf([Account]>=4635 And [Account]<=4645,4650,
IIf([Account]=4655 And [Account]=4655,4655,0))))))))))))))

As you can see each line or range (from/to accounts) rolls into a new account. Think of this as a sub-total.

"IIf([Account]>=4255 And [Account]<=4285,4290," For the range 4255 to 4285, the new account would be 4290.

Regards,
John

4. ## Re: Expression Character Limitation (03)

The problem is not the length of the expression but the number of nested IIfs. It would be best to use a translation table for this, similar to your related question in Excel (<post:=628,163>post 628,163</post:>).

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•