将单元(1,1)转换成“A1”反之亦然 [英] Convert cells(1,1) into "A1" and vice versa
本文介绍了将单元(1,1)转换成“A1”反之亦然的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Excel 2007中处理工作表生成器。我有一定的布局我必须遵循,我经常必须根据输入格式化单元格。因为生成器是动态的,我必须计算各种范围,合并单元格等。
I am working on an worksheet generator in Excel 2007. I have a certain layout I have to follow and I often have to format cells based on input. Since the generator is dynamic I have to calculate all kinds of ranges, merge cells, etc.
如何转换这样的值?
Cells(1,1)
into A1
反之亦然
Cells(1,1)
into A1
and vice versa
推荐答案
地址属性可以为您获得:
MsgBox Cells(1, 1).Address(RowAbsolute:=False, ColumnAbsolute:=False)
返回 A1
。
其他方法可以使用行
和列
属性范围
:
The other way around can be done with the Row
and Column
property of Range
:
MsgBox Range("A1").Row & ", " & Range("A1").Column
返回 1,1
。
这篇关于将单元(1,1)转换成“A1”反之亦然的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文