98.8% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Excel equation into VBA
Excel equation into VBA
Resolved · Low Priority · Version 2016
Tim has attended:
Excel VBA Intermediate course
Excel equation into VBA
Trying to create a VBA function to replicate the excel function =SQRT(SUMSQ(A:A)) Where A:A is any selected range of numbers
current Function code is below:
Function QSUM(myRange As Range, Critiria As Double)
QSUM = Sqr(Application.WorksheetFunction.SumSq(myRange))
End Function
At present value error returned.
RE: Excel equation into VBA
Hi Tim,
Thank you for the forum question and the nice feedback.
I think I must have confused you with the Countif example and I didn't see it when I looked at it during the course.
Try:
Function QSUM(myRange As Range)
QSUM = Sqr(Application.WorksheetFunction.SumSq(myRange))
End Function
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Shared Conditional FormattingIn a shared workbook, conditional formats applied before the workbook was shared will continue to work; however you cannot modify the existing conditional formats or apply new ones. |