码迷,mamicode.com
首页 > 编程语言 > 详细

VBA 列号转换成列英文字母

时间:2018-04-19 11:56:51      阅读:839      评论:0      收藏:0      [点我收藏+]

标签:VBA   列号转换成列英文字母   

Replace(Cells(1, 1).address(False, False), "1", "")

Step1. 获取Cell所在的列(英文字母)和行
Cells(1, 1).address(False, False) -> A1
Cells(1, 1).Address(True, True) -> $A$1
Cells(1, 1).Address(True, False) -> A$1
Cells(1, 1).Address(False, True) -> $A1

Step2. 把行号替换成空

VBA 列号转换成列英文字母

标签:VBA   列号转换成列英文字母   

原文地址:http://blog.51cto.com/13685327/2105225

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!