![]() |
#1
|
|||
|
|||
![]() At work we sometimes get pricing tables -- sometimes quite extensive -- in Word that have originated in Excel, in which the numbers are right aligned but by means of a number of preceding spaces. I think these spaces must be an artifact of some conversion process (I can’t imagine anyone creating a giant table in Excel and trying to align the numbers to the right this way), but I'm unable to recreate it. As shown in the attachment, the spaces in Word then push the longer numbers over onto the next line. My purpose is to try to create a macro that can be applied to the Word table to replace the spaces with a decimal tab that will align the numbers properly. I don't know how to code, but I can record a basic macro. (Thank you for suppressing your mirth.). Left-aligning the column content I can do, and in the find&replace function with wildcards, ( ){2,} will select the spaces, but I can't find the VBA for a decimal tab to use in the replace field. Once the tab is "installed", perhaps it can be specified as a distance from the right cell border or inside margin, since table content, layout, and column widths vary. This could then be easily edited if needed. Help is much appreciated, as always. (If you know what typically used format in Excel creates these spaces in Word, I'd love to know.) |
Tags |
decimal tab, table |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Decimal tabs with space as thousands separator | harry | Word | 1 | 12-22-2023 02:59 PM |
![]() |
Shelley Lou | Word VBA | 16 | 12-21-2020 06:34 AM |
![]() |
LuisXVI | Word VBA | 4 | 11-12-2018 03:12 PM |
Setting tabs relative to block of text | kirkm | Word | 8 | 09-06-2016 07:54 PM |
Pulling 2 digits before a decimal point from adjoining cell then zeros after decimal | jadess916 | Excel | 1 | 06-26-2014 03:48 AM |