spencer_time
Board Regular
- Joined
- Sep 19, 2019
- Messages
- 55
- Office Version
- 365
- 2016
- 2007
- Platform
- Windows
Hello, I am trying to modify a partial solution to a question I had 2 days ago, and I came into a new question.
I am trying to use Application.WorksheetFunction.Max and have it reference all of the values within a dynamic array. What I have tried (both with and without parentheses) thus far is below:
It is not functioning, giving me the error "Compile error: Expected: List separator or )"
Although I am not certain, I believe this to be a syntax issue...when referencing internet searches I see that the correct format is Application.WorksheetFunction.Max(arg1, arg2, arg3……………arg30) and I don't know how to make this work with an array.
I am trying to use Application.WorksheetFunction.Max and have it reference all of the values within a dynamic array. What I have tried (both with and without parentheses) thus far is below:
Code:
MaxVal = Application.WorksheetFunction.Max (LBound(ary) To UBound(ary))
It is not functioning, giving me the error "Compile error: Expected: List separator or )"
Although I am not certain, I believe this to be a syntax issue...when referencing internet searches I see that the correct format is Application.WorksheetFunction.Max(arg1, arg2, arg3……………arg30) and I don't know how to make this work with an array.