![]() |
#1
|
|||
|
|||
![]()
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 ![]() |
#2
|
||||
|
||||
![]()
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] |
#3
|
|||
|
|||
![]()
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. |
#4
|
||||
|
||||
![]()
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.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
currency, format cells, word table |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SUM Two Cells Above & Format to Currency | Karen615 | Word Tables | 1 | 12-01-2023 03:00 PM |
![]() |
DelHop | Word Tables | 11 | 11-24-2019 02:37 PM |
![]() |
Hil | Excel | 1 | 09-16-2015 10:34 AM |
Currency format in form | travelred | Word | 2 | 11-14-2014 06:15 AM |
![]() |
deanorx7 | Excel | 3 | 07-08-2008 04:40 AM |