Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2024, 12:39 PM
PammieJean PammieJean is offline How to apply number formatting to Merge Field in an IF function in Word Windows 10 How to apply number formatting to Merge Field in an IF function in Word Office 2021
Novice
How to apply number formatting to Merge Field in an IF function in Word
 
Join Date: Feb 2024
Location: Illinois
Posts: 1
PammieJean is on a distinguished road
Question How to apply number formatting to Merge Field in an IF function in Word

I’m having problems with a mail merge field number formatting in a table. The function below checks PR1 and PR2 (product) and if they are the same does nothing as there are no more records for that customer. If they are different it puts the amount from the excel data but the formatting is a problem.



There is a next if that sets PR1 before and checks the test column and sets PR2 after the next if. The Test is 1 if it’s the first record of a group and 0 if not (Test =IF(B2=B3,1,0) where B is customer number). The first row of the table uses the merge fields without an If statement and is correctly formatting the numbers for \#$0.00 but the subsequent rows are using the logic below to check if the product has changed, so it does not display duplicate rows, are not accepting number formatting no matter where I put the \#$0.00. What can I do to get correct number formatting?

Current Setup of the cell (without any number format since it wasn't working)

{ IF{ PR1 }={ PR2 } "" "{ MERGEFIELD M_2024_Price_per_lb__Whse }"}

Mail Merge Results: 2.1499999999999999

Excel File Data:

Accounting Format
2.15

Number Format 10 decimals
2.1500000000
Reply With Quote
  #2  
Old 02-07-2024, 05:17 PM
macropod's Avatar
macropod macropod is offline How to apply number formatting to Merge Field in an IF function in Word Windows 10 How to apply number formatting to Merge Field in an IF function in Word Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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 Mailmerge Number & Currency Formatting in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this page: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
if function, mail merge, number format



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apply Image formatting to all pictures in the word using VBA RobertDany Word VBA 2 10-29-2023 03:23 PM
How to apply number formatting to Merge Field in an IF function in Word Merge field return last 4 digits of a number macquhele Mail Merge 6 08-01-2020 11:04 PM
How to apply number formatting to Merge Field in an IF function in Word Apply Picture formatting to all pictures in the word file si14 Drawing and Graphics 13 07-28-2018 03:31 AM
Use a numerical merge field to subtract that number of months MichaelSpedding Mail Merge 8 11-11-2015 01:11 PM
How to apply number formatting to Merge Field in an IF function in Word Merge Field Formatting Welshie82 Mail Merge 4 10-08-2012 03:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:57 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