Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-28-2020, 10:39 AM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default 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.
Attached Images
File Type: png micr.png (59.4 KB, 20 views)
Reply With Quote
  #2  
Old 01-28-2020, 04:54 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 01-28-2020, 09:44 PM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

Only Numeric character needs to be placed in different columns...could you give sample formula how to achieve this..?
Reply With Quote
  #4  
Old 01-28-2020, 11:34 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 01-29-2020, 05:02 AM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

Yes its Purely Numerical data which is MICR Number which will be in Bank check..
Reply With Quote
  #6  
Old 01-29-2020, 02:20 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #7  
Old 01-30-2020, 05:22 AM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

Im getting syntax error, Could you correct me where Im going wrong?


!Syntax Error, «


Formula:
{=MOD(INT(«PAYMENT_REFERENCE»/1000),10) \# 0}


Thanks,
Naveen
Reply With Quote
  #8  
Old 01-30-2020, 02:39 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #9  
Old 02-03-2020, 09:44 AM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

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
Reply With Quote
  #10  
Old 02-03-2020, 02:33 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #11  
Old 02-03-2020, 09:32 PM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

In previous Reply I had attached the Expected output. there is no alphabet values in this field, cross checked multiple times..
Reply With Quote
  #12  
Old 02-03-2020, 09:35 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #13  
Old 02-03-2020, 09:38 PM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

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...?
Reply With Quote
  #14  
Old 02-03-2020, 09:44 PM
macropod's Avatar
macropod macropod is offline How to Split Dynamic merge field values to multiple columns Windows 7 64bit How to Split Dynamic merge field values to multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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'.
Attached Files
File Type: docx Demo.docx (25.2 KB, 8 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #15  
Old 02-03-2020, 10:05 PM
Naveen Dhanaraj Naveen Dhanaraj is offline How to Split Dynamic merge field values to multiple columns Windows 10 How to Split Dynamic merge field values to multiple columns Office 2019
Novice
How to Split Dynamic merge field values to multiple columns
 
Join Date: Jan 2020
Posts: 20
Naveen Dhanaraj is on a distinguished road
Default

Yes I tried as you have suggested but now also returning the same output...
Reply With Quote
Reply

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 to Split Dynamic merge field values to multiple columns 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
How to Split Dynamic merge field values to multiple columns 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
How to Split Dynamic merge field values to multiple columns Summing up values in a Single Merge Field Beowolf Mail Merge 1 03-07-2014 03:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft