想要在公式位置中设置值

如果我有一个名为“top_row”的公式,它指向单元格“A1:A90”有什么方法可以读取单元格的定义? 这是我可以有一个configuration值将是[公式1] [值1] [公式2] [值2]

会有不同的值集合,并不是所有的都会有相同的条目,因此希望按名称列出。

您可以遍历当前工作簿中所有可用的命名范围,并使用以下值:

尝试这个:

Range("A1") = "Name" Range("B1") = "Reference" With Range("A1:B1") .Font.Bold = True .Font.Underline = True End With intCount = 2 For Each namedRange In ThisWorkbook.Names Range("A" & intCount).Value = namedRange.Name Range("B" & intCount).Value = namedRange intCount = intCount + 1 Next