我一直在尝试在一列合并单元格中使用 .find 来查找包含该值的合并区域的顶行。该列看起来像这样。
使用代码
shtfind = BigSht.Range("A:A").Cells.Find("J08").Row
或者
shtfind = BigSht.Range("A:A").mergearea.Cells(1,1).Find("J08").Row
但这些都不起作用。
请帮忙
最佳答案
尝试一个简单的 MATCH 来返回该行。
dim shtfind as long
shtfind = application.match("J08", BigSht.Range("A:A"), 0)
debug.print shtfind
关于Excel VBA - 如何在一列合并单元格中查找值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51786523/