首先确保您已将列格式化为您想要的。确保它是一个有 2 位小数的数字(或者你需要多少位),然后还要确保没有缩进(也许你认为缩进是一个空格?)并且你让它左对齐,或者您希望数据在哪里。仅此一项就可以解决您的问题。
如果这在此处不起作用,请列出可能的解决方案。
=Value(Trim(A1)) ' Removes all white space before and after the text in A1
=Value(Clean(A1)) 'Removes all non printable Charactersin A1
=Value(SUBSTITUTE(I3," ","")) 'Substitutes(Replaces) all instances of " "(Space) with ""(nothing)
'****Note: With Substitute you can also specify how many
' Substitutes(Replaces) to make of the value
=Value(SUBSTITUTE(I3," ","",1)) ' Same as above but with only remove the FIRST space
=Value(Trim(Clean(A1))) ' Removes all white space before and after the text
' after removing all Non-Printable Characters
=Value(Trim(Clean(Substitute(A1," ","")))) ' Removes all white space before and after the
'after removing all Non-Printable Characters
' And after replaceing all spaces with nothing
=Value(Right(A1, Len(A1)-1)) ' This takes the End of your text by the number of characters
' in the value Except the First (In your case should be the Space)
=Value(SUBSTITUTE(I6,CHAR(160),"")) 'To help with the non breaking spaces also.
如果没有任何效果,请分享您为什么要删除空间?就像你试图对数据做些什么一样?因为也许这会打开更多的解决方案
使用 Ole Henrik Skogstrøm 的建议,在函数周围添加了价值,以将结果作为值。