我很難在 VBA 中設定正確的公式以在串列中輸出唯一值串列。
Dim lastRow As Long
With ActiveSheet
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
Range("B1").Select
ActiveCell.Formula2R1C1 = "=UNIQUE(RC[-1]:" & lastRow & ")"
我想要做的很簡單。只需使用從單元格 A1 到該列最后一行的范圍并將其推送到唯一公式。
uj5u.com熱心網友回復:
A1 符號:
Range("B1").Formula2 = "=UNIQUE(A1:A" & lastRow & ")"
R1C1 符號:
Range("B1").Formula2R1C1 = "=UNIQUE(RC[-1]:R[" & lastRow & "]C[-1])"
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/352393.html
上一篇:如何在Matplotlib中為不同圖形的y軸刻度標簽提供相同的空間?
下一篇:Excel回傳錯誤回應
