Requires After Effects 2020 or later.
If the expression isn't working go to: File > Project Settings > Expressions and make sure the dropdown is set to: Javascript
/**
* The following expression will format a number variable as currency
*/
var num = [YOUR NUMBER HERE];
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", currencyDisplay: "narrowSymbol"});
/**
* Create a new text layer and set it to 200
* Apply this to the Source Text property of the text layer
*/
var num = parseFloat(text.sourceText);
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", currencyDisplay: "narrowSymbol"});
Note: For this example, you will first need to do the following:
/**
* NOTE: Change GBP for the currency code of your choice e.g: USD
**/
var num = parseFloat(effect("Slider Control")("Slider"));
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", currencyDisplay: "narrowSymbol"});
Note: For this example, you will first need to do the following:
/**
* NOTE: Change GBP for the currency code of your choice e.g: USD
**/
var num = parseInt(effect("Angle Control")("Angle"));
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"});