Excel - 复制显示的值而不是实际值 [英] Excel - Copy the displayed value not the actual value

查看:780
本文介绍了Excel - 复制显示的值而不是实际值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名飞行员,并使用一个名为Logten Pro的日志程序。我有能力采用从我的工作飞行管理软件中保存的excel电子表格,并使用CSV格式将其导入Logten Pro。

I am a pilot, and use a logbook program called Logten Pro. I have the ability to take excel spreadsheets saved from my work flight management software, and import them into Logten Pro using the CSV format.

但是,我的问题是工作飞行管理软件,以以下excel格式将航班起飞的日期和时间输出到一个单元格:DD / MM / YYYY H:MM:SS PM。
Excel可以处理好这件事,并且默认情况下格式化为DD / MM / YY,即使实际值更具体,包括全长日期和时间组。

My problem however, is that the work flight management software, exports the date and time of take-off of a flight into one cell in the following excel format: DD/MM/YYYY H:MM:SS PM. This is handled fine by Excel, and is formatted by default to DD/MM/YY even though the actual value is more specific, comprising of the full length date and time group.

这是一个问题,因为Logten Pro只会自动导入日期,如果它是DD / MM / YY格式,没有办法拉出只显示的DD / MM / YY日期,而不是完整的日期时间组实际值,除非您手动通过并从功能框中删除额外的文本。

This is a problem because Logten Pro will only auto-import the date if it is in DD/MM/YY format, and there is no way to pull out just the displayed DD/MM/YY date rather than the full date time group actual value, unless you manually go through and delete the extra text from the function box.

我的问题是:是否有可以自动的VBA宏复制实际显示的文本,并将其粘贴到另一个单元格中,将实际值更改为只有DD / MM / YY值?另外,这可以一次完成一个列,而不是单个单元格?

My question is: Is there a VBA macro that can automatically copy the actual displayed text, and paste it into another cell, changing the actual value as it does, to just the DD/MM/YY value? Additionally, can this be made to work down a whole column rather than individual cells at a time?

注意我没有VBA的经验,所以完美的答案只是一个完整的VBA字符串我可以复制粘贴。

Note I have no VBA experience so the perfect answer would just be a complete VBA string I could copy and paste.

谢谢。

推荐答案

正如评论中所指出的,你最好不要使用VBA,而不是使用公式。

As pointed out in the comments, you'd better not use VBA but formulas instead.

此公式:

TEXT(A1,"dd-mm-yyy")

将以文本方式返回格式化日期。您可以在单元格的整个范围内拖放公式,而复制/粘贴特殊> ,以便您只有在Logten Pro才能导入所需的值。

will return the formated date in a text way. You can drag and drop the formula in the whole range of your cells and Copy/Paste Special > Values so that you will only have the needed values to get imported in Logten Pro.

这篇关于Excel - 复制显示的值而不是实际值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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