In a Google Spreadsheet, I have a price for stocks displaying. I would like to remove the decimals if the price is over $1,000. I am half way there using MROUND function and TEXT function:
=iferror(TEXT(IF(googlefinance(B2,"price")<1000,googlefinance(B2,"price"),MROUND(googlefinance(B2,"price"),1)),"$###,###.##"))
I still get the .00 at the end, or just a . for companies over $1,000. Any way anyone knows to remove this?
CodePudding user response:
Instead of using the TEXT
function, how’s applying this custom number format?
[>1000]$#;[<=1000]$###,###.00
To apply a custom number format:
- Select the cells you want to apply it to.
- Format > Number > Custom number format
- Enter the format in the input field and click Apply.
More on the custom number format: