Question: ?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.

?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 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!