本以为能在Excel表格中直接使用的函数也能直接移植到VBA中,结果发现根本行不通,程序报错。后来通过多方查询发现,虽然不能直接引用,但是我们可以曲线救国,excel中表格可以用max函数,在VBA中也可以用,只需通过WorksheetFunction对象就可以引用,后面加函数名称,然后加range来引用单元格。举个例子: Application.WorksheetFunction.Max(range("A1:C5")) 下面就是能在VBA中使用excel自带函数: A__ Acos Acosh And Asin Asinh Atan2 Atanh AveDev Average B__ BetaDist BetaInv BinomDist C__ Ceiling ChiDist ChiInv ChiTest Choose Clean Combin Confidence Correl Cosh Count CountA CountBlank CountIf Covar CritBinom D__ DAverage Days360 Db DCount DCountA Ddb Degrees DevSq DGet DMax DMin Dollar DProduct DStDev DStDevP DSum DVar DVarP E__ Even ExponDist F__ Fact FDist Find FindB FInv Fisher FisherInv Fixed Floor Forecast Frequency FTest Fv G__ GammaDist GammaInv GammaLn GeoMean Growth H__ HarMean HLookup HypGeomDist I__ <Index Intercept Ipmt Irr IsErr IsError IsLogical IsNA IsNonText IsNumber Ispmt IsText J__ K__ Kurt L__ Large LinEst Ln Log Log10 LogEst LogInv LogNormDist Lookup M__ Match Max MDeterm Median Min MInverse MIrr MMult Mode N__ NegBinomDist NormDist NormInv NormSDist NormSInv NPer Npv O__ Odd Or P__ Pearson Percentile PercentRank Permut Phonetic Pi Pmt Poisson Power Ppmt Prob Product Proper Pv Q__ Quartile R__ Radians Rank Rate Replace ReplaceB Rept Roman Round RoundDown RoundUp RSq RTD S__ Search SearchB Sinh Skew Sln Slope Small Standardize StDev StDevP StEyx Substitute Subtotal Sum SumIf SumProduct SumSq SumX2MY2 SumX2PY2 SumXMY2 Syd T__ Tanh TDist Text TInv Transpose Trend Trim TrimMean TTest U__ USDollar V__ Var VarP Vdb VLookup W__ Weekday Weibull X__ Y__ Z__ ZTest |