Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Excel 宏,它从 .csv 文件填充图表,其值从单元格开始A1,B1在 x 和 y 轴上。现在,当我添加多个值范围为A3,的 .csv 文件时B3,它会引发错误,指出单元格为空。知道为什么会这样吗?
A1
B1
A3
B3
换行
Plot_y = Range("C1", Selection.End(xlDown)).Rows.Count Plot_x = Range("D1", Selection.End(xlDown)).Rows.Count
到
Plot_y = Range("C" & Rows.Count).End(xlUp).Row Plot_x = Range("D" & Rows.Count).End(xlUp).Row
然后再试一次。