Text strings that match a number format of your locale can be easily coerced to numbers using a number of approaches.
=VALUE(SUBSTITUTE(<oldFormula>;" ";))
For example,
- The VALUE function
VALUE("1,5")
= 1,5
06.05.2023 22:07:37
= VALUE("06.05.2023 22:07:37")
- Multiply the text string by 1
"1,5"*1
= 1,5
"06.05.2023 22:07:37"*1
= 06.05.2023 22:07:37
The default %
number format on your system is "#0,#%"
("#.##0,#%"
would work too), but the format being returned by your formula is "#,#0 %"
.
In other words, you are only one space " "
away from an acceptable format.
My recommendation is to simply
- Wrap your existing formula in a SUBSTITUTE function, replacing
" "
with ""
. You can optionally leave the "replace with" value empty instead of ""
.
- Wrap that SUBSTITUTE function in a VALUE function to coerce it to a number
Formula syntax would now be: =VALUE(SUBSTITUTE(<oldFormula>;" ";))
Old Formula
=INDEX(IMPORTHTML("https://aktien.guide/dividende/Air-Liquide-FR0000120073";"TABLE";3);4;2)
="2,29 %"
New Formula
=VALUE(SUBSTITUTE(
INDEX(IMPORTHTML("https://aktien.guide/dividende/Air-Liquide-FR0000120073";"TABLE";3);4;2);
" ";))
=2,29%