#1
|
|||
|
|||
How to round a number merged from access to a word table
Thanks to @macropod #macropod, I understand rounding to the nearest five. {=ROUND((SUM(5,6,7)/5,0)*5} How can I do this with a {MERGEFIELD} from Access into a Word table cell? |
#2
|
||||
|
||||
Word fields are not a great place to do mathematical calculations so I would prefer to address this via the SQL query (either in Word's merge or by creating the query in Access and then linking to that query in the Merge). For instance, this SQL works to round to nearest 5
Code:
SELECT [Last Name], [First Name], [Number1], [Number2], (Round([Number1]/5,0))*5 AS Num1, (Round([Number2]/5,0))*5 AS Num2 FROM Employees; {=Round({MERGEFIELD Number1}/5,0)*5}
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Quote:
|
Tags |
maths, merge, syntax |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug in table with merged cells (word 2016) | ch.b | Word | 2 | 09-12-2017 09:41 AM |
Text position in merged table cells - word 2010 | ellentk | Word Tables | 3 | 09-09-2015 03:33 PM |
Round off the number | ubns | Word VBA | 4 | 09-06-2012 03:55 PM |
Set range for merged Word table cells? | tinfanide | Word VBA | 1 | 02-06-2012 05:57 AM |
How do I reference a merged cell in a multi column & row table in MS Word ('03')? | jihanemo | Word Tables | 0 | 03-18-2009 08:33 AM |