货号 2个 4个 2个 7 5个 6
Range("A9").Select ActiveCell.Formula2R1C1 = _ "=UNIQUE('1.Technical Compliance'!R[-2]C[4]:R[45]C[4])"
上面VBA的结果是:
货号 2个 4个 5个 6个 7 0
从结果来看,如何避免最后一行出现“0”值
Range("A9").Formula2R1C1 = _
"=LET(data,'1.Technical Compliance'!R[-2]C[4]:R[45]C[4]," _
& "UNIQUE(FILTER(data,data<>"""")))"
""""
替换为 0
.