Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2024, 05:28 PM
Melsy Melsy is offline Change Word Table format to Currency Windows 10 Change Word Table format to Currency Office 2016
Novice
Change Word Table format to Currency
 
Join Date: May 2023
Location: Sydney, Australia
Posts: 6
Melsy is on a distinguished road
Question Change Word Table format to Currency

Hi All,



I was hoping to get some help to create a macro that will change the format of my word table column.

Table 2, Column 2, from Row 2 and all rows below. (note: the table has column headings).

The font needs to stay the same, only the numbers need to be formatted into currency format so it looks like this > $ 1,000,000.00 > and aligned to the bottom right of the cell.

Also, this particular column then has an "update totals" macro which sums all these amounts onto another table (Table 3), so I'm hoping this will not break the update totals macro.

Ideally I want it to format the numbers to currency format, prior to updating the totals.

Any help you can give me would truly be appreciated!

Thanks in advance
Reply With Quote
  #2  
Old 12-04-2024, 12:06 AM
macropod's Avatar
macropod macropod is offline Change Word Table format to Currency Windows 10 Change Word Table format to Currency Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
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, for example: https://www.msofficeforums.com/16726-post2.html
You can choose whether to format all numbers in the table, or just the selected cells. As coded, all numbers in the selected cells get formatted as either #,##0.00 or $#,##0.00, depending on which option you choose.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-04-2024, 03:18 PM
Melsy Melsy is offline Change Word Table format to Currency Windows 10 Change Word Table format to Currency Office 2016
Novice
Change Word Table format to Currency
 
Join Date: May 2023
Location: Sydney, Australia
Posts: 6
Melsy is on a distinguished road
Default

Hi Macro Pod,

Thanks for your response. however I need the macro to run seemlessly without any user input. Is there a way to bpypass the VB prompt and not having to manually select the numbers and just force the currency format to column 2 > row 2 and below?

All the items in Column 2 are prices of items (except the header of course) and then they get added all together for a price total using another macro.
Reply With Quote
  #4  
Old 12-04-2024, 07:39 PM
macropod's Avatar
macropod macropod is offline Change Word Table format to Currency Windows 10 Change Word Table format to Currency Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
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

To do something like that would requires you to do something like having a content control in every cell that's to have the formatting, then use a content control exit macro to reformat the cell once its's exited. See attached demo. Pressing Alt-F11 will expose the macro.

With this approach, either the document must be saved in the docm format, or the macro has to be added to its template, which must then be saved in the dotm format.
Attached Files
File Type: docm Tbl Fmt Demo.docm (26.6 KB, 4 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
currency, format cells, word table



Similar Threads
Thread Thread Starter Forum Replies Last Post
SUM Two Cells Above & Format to Currency Karen615 Word Tables 1 12-01-2023 03:00 PM
Change Word Table format to Currency How do I create currency cells in a Word Table DelHop Word Tables 11 11-24-2019 02:37 PM
Change Word Table format to Currency Why do currency cells automatically change to date format on some worksheets Hil Excel 1 09-16-2015 10:34 AM
Currency format in form travelred Word 2 11-14-2014 06:15 AM
Change Word Table format to Currency change currency $ to £ on excel invoice help deanorx7 Excel 3 07-08-2008 04:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:09 AM.


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