Forum Discussion
Alfieb1996
May 26, 2022Brass Contributor
Nested Function IF, LEN, DIVIDE
Hi,
I need to construct a formula that divides a number by 1000 if it is a certain length. I.e 5.139 needs to be divided by 1000 whereas 5.52 (in the same column) does not. Can anyone help?
Thanks,
Alfie
That could be
=IF( LEN(A1) > 4, A1/1000, A1)
however actual length is not exactly what you see in grid, it depends on formatting.
- Alfieb1996Brass ContributorThat works perfectly, thank you. I should of stated. I need extra conditions. So I need to:
divide everything by 2, if it's length of 4 divide by 1000 (after it's been divided by 2) but if it's less than 4 then do not divide by 1000.
Thank you,
AlfieNot sure I understood what you'd like to achieve. Let assume you have number 1234.5. Length is 6. Divide on 1000, it'll be 1.2345. Length is exactly the same, 6, nothing changes.