1
目前我正在嘗試獲取一組數字的最小值,最大值,平均值和標準偏差。我希望能夠選擇任何列並能夠找到這些數據。即使我不得不分開進行選擇。我怎樣才能使這個工作?看下面:如何獲得此VBA代碼以使用任何選定的列?
Range("P4").Select
ActiveCell.FormulaR1C1 = "=MIN(RC[-12]:RC[-8],RC[-6]:RC[-2])"
Range("Q4").Select
ActiveCell.FormulaR1C1 = "=MAX(RC[-13]:RC[-9],RC[-7]:RC[-3])"
Range("R4").Select
ActiveCell.FormulaR1C1 = "=AVERAGE(RC[-14]:RC[-10],RC[-8]:RC[-4])"
Range("S4").Select
ActiveCell.FormulaR1C1 = "=STDEV.S(RC[-15]:RC[-11],RC[-9]:RC[-5])"
Range("P4:S4").Select
Selection.AutoFill Destination:=Range("P4:S68"), Type:=xlFillDefault
Range("P4:S68").Select