Good Day,
I have price and spread values. Price is numeric, while Spread can be +1, +0.5, -0.5, -1 or "Flat" aka 0
My task is to put the 2 values together.
E.g. Price = 600
I need the final result to always show 2 decimal places, even if they are .00
And it cannot round up or down. But my .00 are always trimmed off.
Any advise is appreciated. Thank you.


You could do this with a formula:
Assuming that the price is stored in a named range
Priceand your data is stored in column A, starting in row 2:Explanation:
The
TEXT-function converts a number into a formatted string, giving a format pattern. '0.00' will format the value with 2 decimals - that gives you for example600.00or599.95Now we use the
IF-function to check if the value is equal toPRICEor different. If it is equal toPRICE, we write the stringFlat, else we calculate the difference. We need to use theROUND-function because else we can get a difference of0.00999999instead of0.01because of floating point math.The rest is string concatenation