简体   繁体   English

需要在Excel中剥离前导零

[英]Need to strip off leading zeros in excel

I downloaded banking account data in a csv file with fields separated by commas. 我将银行帐户数据下载到csv文件中,其中的字段用逗号分隔。 I converted it into excel file succesfully, except by the fact that I couldn't remove the leading zeros en the numeric financial fields. 我成功将其转换为excel文件,但无法删除数字财务字段中的前导零。 Looks like they were pasted as text. 看起来它们被粘贴为文本。 I need to strip off the leading zeros from excel cells, and handling the numeric data afterwords. 我需要从excel单元中去除前导零,并处理数字数据后记。 Any help? 有什么帮助吗? By the way: I found a lot of instructions in the web -including this site- to help doing exactly the opposite, I mean to prevent stripping off leading zeros. 顺便说一句:我在网上找到了很多说明(包括该站点)来帮助做相反的事情,我的意思是防止剥离前导零。 That is not what I need. 那不是我所需要的。 I need the data without leading zeros. 我需要没有前导零的数据。 Thanks for your help. 谢谢你的帮助。

Simple fix for numbers stored as text: enter the number 1 in a numeric cell (any will do, this is a throwaway). 简单地解决以文本形式存储的数字:在数字单元格中输入数字1(任何方法都可以,这是一掷千金)。 Copy the cell that contains 1. Select all the text numbers you want to convert to numeric. 复制包含1的单元格。选择要转换为数字的所有文本数字。 Then do Edit -> Paste Special -> Multiply . 然后执行Edit -> Paste Special -> Multiply This will multiply all the data in those cells by 1. Excel will have to convert the text to numbers to do this, and the result will be a simple conversion (since anything times 1 is itself). 这会将这些单元格中的所有数据乘以1。Excel必须将文本转换为数字才能执行此操作,并且结果将是简单的转换(因为任何东西本身都是1)。

Let us know how it goes. 让我们知道怎么回事。

Try using the Value() function. 尝试使用Value()函数。 It converts numeric strings, even with commas. 它将转换数字字符串,即使使用逗号也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM