#1
|
|||
|
|||
How to Split Dynamic merge field values to multiple columns
I'm generating word document from salesforce (cloud system) with different merge field values.Values are populating in word document.Please find the attached image below to populate values in different column from merge fields with correct alignment and spacing as per the attached check. |
#2
|
||||
|
||||
You don't say what's in the mergefield that you want to split. Something would be possible with purely numeric data, but is not feasible with mixed alpha-numerics or text.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Only Numeric character needs to be placed in different columns...could you give sample formula how to achieve this..?
|
#4
|
||||
|
||||
You haven't addressed the basic issue of what the mergefield outputs - purely numeric data, mixed alpha-numerics, or text. Presumably it's not the last of these, but which of the other two?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Yes its Purely Numerical data which is MICR Number which will be in Bank check..
|
#6
|
||||
|
||||
In that case, you could use a series of fields coded as:
{=MOD(INT({MERGEFIELD Micr_Number}/1000),10) \# 0} {=MOD(INT({MERGEFIELD Micr_Number}/100),10) \# 0} {=MOD(INT({MERGEFIELD Micr_Number}/10),10) \# 0} {=MOD({MERGEFIELD Micr_Number},10) \# 0} etc., or: {=MOD(INT(«Micr_Number»/1000),10) \# 0} {=MOD(INT(«Micr_Number»/100),10) \# 0} {=MOD(INT(«Micr_Number»/10),10) \# 0} {=MOD(«Micr_Number»,10) \# 0} etc. to separate out the individual digits. Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Im getting syntax error, Could you correct me where Im going wrong?
!Syntax Error, « Formula: {=MOD(INT(«PAYMENT_REFERENCE»/1000),10) \# 0} Thanks, Naveen |
#8
|
||||
|
||||
If you're seeing that in the mailmerge output, it means you ignored the Note to my previous reply.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
Even though if I have syntax error now values are returning.
I have 13 values which are coming from field,11 values are coming as expected but other two values are not populating ,its coming as -8 -8 . Do I need to make any change in formula ? This is My Formula, {=MOD(INT(«ACCOUNT_NUMBER»/100000000000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/10000000000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/1000000000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/100000000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/10000000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/1000000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/100000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/10000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/1000),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/100),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/10),10)\#0} {=MOD(INT(«ACCOUNT_NUMBER»/1),10)\#0} Received Output Value: 0 1 3 0 1 0 9 1 7 6 1 -8 -8 <<<<<like this Expected Output Value: 130109176110 Thanks, Naveen |
#10
|
||||
|
||||
The formula approach I provided works for numbers up to 15 digits. Evidently, your data include something other than numbers after the 11th digit.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#11
|
|||
|
|||
In previous Reply I had attached the Expected output. there is no alphabet values in this field, cross checked multiple times..
|
#12
|
||||
|
||||
Expected output and actual input are not the same thing. Unless you've messed up the field coding, your results are clearly indicative of something other than numerals in the source data.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#13
|
|||
|
|||
When I was trying in excel with same formula works fine..But when it comes to word only last two digits are making issues.. which is returning as -8 -8...
Shall I share the screen with you if you want...? |
#14
|
||||
|
||||
See attached document proving the field coding works with '0130109176110' as input. To work in your mailmerge main document, all you'd need do is change 'FILLIN' in the field code to 'MERGEFIELD'.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#15
|
|||
|
|||
Yes I tried as you have suggested but now also returning the same output...
|
Tags |
mergefields, table, word 19 |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Field has multiple values how get those multiple values into one row | madiso10 | Excel | 1 | 06-02-2017 04:48 AM |
How do I mail merge records into table columns with more than one merge field? | tech123 | Mail Merge | 1 | 04-26-2017 07:13 PM |
Excel / Mail Merge - Return Column Headers for All and Any Columns with Values | eduams | Mail Merge | 1 | 09-26-2016 07:02 PM |
Hide rows in multiple columns based on zero values | Deane | Excel Programming | 19 | 06-23-2015 11:24 PM |
Summing up values in a Single Merge Field | Beowolf | Mail Merge | 1 | 03-07-2014 03:26 PM |