Price adjuster

There are two scripts (that I'm aware of) that can be used to adjust numbers and prices: Olav Kvern's 'PriceUpdateByString' script and Steve Wareham's 'number_adjuster'. Ole's script was written for InDesign CS2 and isn't compatible with newer versions of InDesign, and Steve's scripts needed some attention to rounding of numbers. Since both scripts needed some attention and as they complemented each other (there was some overlap), the logical thing to do was to write a new script that combined the functionality of both scripts. Ole gave permission to repurpose any of his code, but Steve could not be found and his web site appears to have gone permanently off-line.


The script shows this dialog:

Price adjuster

Operation Options are Multiply, Divide, Add, and Subtract.

Operator Enter the operator. To multiply all prices by 2, enter 2. Ole's script had the possibility to add a percentage to prices, which can be done with this script too: multiply prices by 1.18 to add 18% to all prices. You can use . or , for decimals.

Currency symbol Options are £, , $, ¥, ¤, , Any, and None. 'Any' matches any and all prices, 'None' ignores currency symbols so that the script in effect becomes a general number adjuster. If you include a currency symbol, a space after the symbol is ignored.

Separator Select a separator to be added between the currency symbol and money amount. Options are [None], Fixed space, Third space, Quarter space, Sixth space, Thin space, and Hair space.

Number format Choose 1,234.56 or 1.234,56. The script really only needs to know the decimal character. It finds numbers with and without thousands separators.

Insert thousands separator Indicate whether thousands separators should be used in the adjusted numbers.

Number of decimals Select the number of decimals to be used.

Apply colour Another feature from Ole's script which appeared to be popular. It makes checking the results easy. It's best to create a separate swatch so that you can remove the colour easily. Select [Ignore] if you don't want to apply a colour.

Target Select the target (Document, Story, To end of story, or Selection).

Version history

8 Sept. 2015: Fixed a problem with the $ symbol so that US dollar prices are processed correctly.

15 August 2015: Posted.

Useful script? Saved you lots of time?

Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

Peter Kahrel's paypal account

Show script (right click, Save Link/Target As to download)

Back to script index

Installing and running scripts

Questions, comments? Get in touch