在Excel 2013 VBA中引用命名单元格的方式是什么? (我知道我搞砸了) [英] What's the RIGHT way to reference named cells in Excel 2013 VBA? (I know I'm messing this up)
本文介绍了在Excel 2013 VBA中引用命名单元格的方式是什么? (我知道我搞砸了)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个单元格(好的,有一堆,但我只是看一个现在)命名为类。 Excel的网格符号为C10。
I have a cell (Ok there's a bunch but I'm just looking at one now) named "Classes". It's "C10" by Excel's grid notation.
当我将单元格引用为
Range("C10") = "Value"
但是当我使用
Classes = "Value"
它什么也没做。
那么,以名称引用命名单元格的正确方法是什么?
So, what's the correct way to reference a named cell by its name?
推荐答案
用指定范围的名称替换地址:
You replace the address with the named range's name:
Range("Classes") = "Value"
这篇关于在Excel 2013 VBA中引用命名单元格的方式是什么? (我知道我搞砸了)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文