删除撇号? [英] remove apostrophe?

查看:116
本文介绍了删除撇号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从另一个程序导入了数据,我遇到了这个问题,其中撇号被添加到每个Cell的开头;因为这个我不能格式化细胞。有人有解决方案吗?我正在使用Excel 2003提前感谢。

I have imported data from another program, and I run into this problem where an apostrophe got added to the beginning of each Cell; because of this I can''t format the cells. Anyone has a solution? I am using Excel 2003 Thanks in advance.

推荐答案

我对你的帖子感到困惑,因为这是一个Access问题的论坛。您是否将数据 Excel 2003导入Access?


您也没有说明您要尝试这样做的地方,但是在 Access / VBA 剥离一个前导撇号的一般方法是
I''m confused by your post, in that this is a forum for Access questions. Are you importing data from Excel 2003 into Access?

You also don''t say where you''re trying to do this, but in Access/VBA the general way to strip a leading apostrophe would be
展开 | 选择 | Wrap | 行号


嗨。 Linq的解决方案适用于VBA和Access。假设这实际上是一个Excel问题,撇号表示值被导出为文本(在Excel中使用前导撇号强制将值解释为文本字符串)。撇号实际上并不被视为字符串的一部分,因此删除它并不是那么简单。


Excel中最简单的解决方案是将这些值保留为原样,在它们之后立即添加一个空白列,并从列顶部单元格中复制以下值转换:
Hi. Linq''s solution is valid for VBA and Access. Assuming that this is really an Excel question, the apostrophe is indicating that the values were exported as text (in Excel the use of a leading apostrophe forces interpretation of values as text strings). The apostrophe is not actually treated as part of the string, so removing it is not as straightforward as it could be.

The simplest solution in Excel itself is to leave these values as they are, add a blank column immediately after them and replicate the following value conversion from the top cell down the column:
展开 | 选择 | Wrap | 行号


这实际上比它看起来要复杂得多(尽管如果你能承受丢失任何可能与细胞相关的格式,那么St ewart'的解决方案适合你)。问题是Excel中的撇号是以特殊的方式处理的,因为它的工作方式与格式相似,但是以只看到数据的方式存储在单元格中(检查.Value,.Text和amp; .Formula属性) 。当单元格处于活动状态时,唯一可以找到撇号的地方是单元格编辑区域。


假设Stewart的解决方案不能满足您的需求,请尝试以下更多内容相反,它将保留原始单元格(列)中的所有格式等。
This is actually a lot more complicated than it appears (although, if you can afford to lose any formatting that might be associated with the cells, then Stewart''s solution will work well for you). The problem is that the apostrophe is treated in a special way by Excel in that it works like formatting but is stored in the cell in such a way that only the data is seen (Check the .Value, .Text & .Formula properties). The only place I can find the apostrophe is in the cell editing area when the cell is active.

Assuming Stewart''s solution is not adequate to your needs, try the following slightly more fiddly one instead which will keep all formatting etc from the original cells (column).
  1. 复制所需的列(在顶部选择,然后按Ctrl-C)。
  2. 插入下一列位置(选择下一列,然后使用右键单击,选择插入复制的单元格)。
  3. 选择要更改的所有单元格。
  4. 键入A(或任何基本文本),然后按Ctrl-Enter将其放入每个选定的单元格中。这样可以清除单元格中是否要插入撇号。
  5. 键入= CellRef。 (按=键,然后按右箭头键),然后按Ctrl- Enter键将公式的修改版本输入到每个选定的单元格中。
  6. 再次复制这些单元格(Ctrl-C)。 / li>
  7. 粘贴/特殊/值(Alt-E,S,V,Enter)将更改的值放回选定的单元格中。
  8. 最后,请记住删除添加的列保留以前的数据,除了删除了撇号。


这篇关于删除撇号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆