I have numbers like 1170.0000 and the length is 9.
I have some like 1170.001 and the length is 8.
I need to add a 0 everywhere the length is not 9.
Solved! Go to Solution.
are they numbers? are they strings? what about 11700.0001? padright can work for strings - for numbers - you'd want to convert to fixed decimal.
Not all numbers will be in the thousands? Are you actually just trying to ensure there will always be 4 decimal places? I think this could be quite troublesome. What happens if some values are already more than length of 9?
Here's a method to get what you want, but I don't think it's ideal: PadRight([column here], 9, "0")
Try the attached workflow. You can combine all of the formulas into one, but I left them separate to make it easier to understand.
If your input value is a string, you won't need the first formula.
This is just to point you in the right direction. You'll need to account for the overall length of 9 that you're trying to test for.
Chris
@Farriyajawed
I would agree with @apathetichell
If it is string, PadRight should work and it if it is numeric then FixeDecimal.