在Excel中检查系列收集公式
我想检查是否seriescollection(1).formula
是期望的string或预期范围的.value,但我尝试的任何东西总是成功,无论像这样的数据:
If graf.SeriesCollection(1).Formula = _ Range("Podatki!$B$1:$C$97;Podatki!$K$1:$L$97") Then MsgBox ("1") End If If graf.SeriesCollection(1).Values = _ Range("Podatki!$B$1:$C$97;Podatki!$K$1:$L$97") Then MsgBox ("2") End If
您是否错过了这一行(第一行)中的Formula
语句:
graf.SeriesCollection(1).Formula = Range("Podatki!$B$1:$C$97;Podatki!$K$1:$L$97") .Formula
类似的values
:
graf.SeriesCollection(1).Value2 = Range("Podatki!$B$1:$C$97;Podatki!$K$1:$L$97").Value2