文本格式的Excel VBA宏编码 [英] Excel VBA Macro Coding For Text Format

查看:193
本文介绍了文本格式的Excel VBA宏编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用将要使用的代码将当前单元格值更改为文本格式.

例如:

Thisworkbook.Sheets("Jai").Cells(3,5).NumberFormat ="General"


请给我建议,并告诉我该操作的快捷键.. ???


因为15-08的值应更改为Aug-08..!!!

I want to change the current cell value into Text format by using which code that I will use..??


for exammple:

Thisworkbook.Sheets("Jai").Cells(3,5).NumberFormat="General"


Pls give me the suggestion and tell me the shortcut key for that..???


because of 15-08 value should be changed into the Aug-08..!!!

推荐答案

对于范围A1:C20,请使用以下命令:

For a range A1:C20 then use this:

Range("A1:C20").NumberFormat = "General"



已添加代码标签-LOSMAC [/EDIT]



Code tags added - LOSMAC[/EDIT]


什么样的建议,什么样的快捷方式?

1)选择单元格范围或单个单元格,
2)在所选内容上单击鼠标右键,
3)选择单元格格式",
4)更改格式.

就是这样!
What kind of suggestion, what kind of shortcut?

1) Select range of cells or single cell,
2) Click the right button of mouse on the selection,
3) Choose "Cell formatting",
4) Change formatting.

That''s all!


这篇关于文本格式的Excel VBA宏编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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