Answered step by step
Verified Expert Solution
Question
1 Approved Answer
?VBA Question. Please include comments so I can follow along and learn. There is no easy way in Excel to output the location (row and
?VBA Question. Please include comments so I can follow along and learn.
There is no easy way in Excel to output the location (row and column number) of the maximum value of an array. It is possible to do this for a single row or a single column but not an array. Create a user- defined VBA function that will take a range as the argument and the function will output the row number or column number, depending upon how you use the function. LOCATEMAX([range],1)" should output the row number of the maximum value of the array and "=LOCATEMAX(range,2)" should output the column number of the maximum value of the array. Example Output: -20 -20 4 4 6 LOCATEMAX(A1:C3,2) -20 4 There is no easy way in Excel to output the location (row and column number) of the maximum value of an array. It is possible to do this for a single row or a single column but not an array. Create a user- defined VBA function that will take a range as the argument and the function will output the row number or column number, depending upon how you use the function. LOCATEMAX([range],1)" should output the row number of the maximum value of the array and "=LOCATEMAX(range,2)" should output the column number of the maximum value of the array. Example Output: -20 -20 4 4 6 LOCATEMAX(A1:C3,2) -20 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started