View Single Post
 
Old 07-30-2020, 04:15 AM
macquhele macquhele is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2020
Posts: 1
macquhele is on a distinguished road
Default Merge field return last 4 digits of a number

Hi there. I am looking for a merge switch that will return the last 4 digits of a 16 digit number. I've searched a number of threads and forums on this topic and found the following:
{=MOD({MERGEFIELD ACCOUNT_NUMBER },10000 \#0000 }
However, I am finding that the switch rounds the last of the 4 digits up. I attempted to include a minus 1 calculation in the switch but this only works for numbers 0 to 8 because number 9 returns a zero. As an example if the last 4 digits is 1239 the switch returns 1230 so deducting 1 makes it 1229. Does anyone know if there is a way to fix this?
Thank you in advance of any help.
Regards. Mac
Reply With Quote