I am looking for the MAX value in an array(B2:H8), and wish to know the row and column numbers where it is.
I have figured out how to get the row and coulmn numbers of MAX using the following formula:
=IF(ISERROR(MIN(IF(B2:H8=MAX(B2:H8),ROW(B2:H8)+(COLUMN(B2:H8)/1000),65537))),"",MIN(IF(B2:H8=MAX(B2:H8),ROW(B2:H8)+(COLUMN(B2:H8)/1000),65537)))
The left number is row and the number following the decimal is column.
My problem is that if the array is totally empty, I get the number representing the uper left cell. if I populate one or any cells with numbers it works correctly.
Any idea how I can get the result to be blank if all cells are blank?
Help is appreciated!
Thanks,
philb1341
I have figured out how to get the row and coulmn numbers of MAX using the following formula:
=IF(ISERROR(MIN(IF(B2:H8=MAX(B2:H8),ROW(B2:H8)+(COLUMN(B2:H8)/1000),65537))),"",MIN(IF(B2:H8=MAX(B2:H8),ROW(B2:H8)+(COLUMN(B2:H8)/1000),65537)))
The left number is row and the number following the decimal is column.
My problem is that if the array is totally empty, I get the number representing the uper left cell. if I populate one or any cells with numbers it works correctly.
Any idea how I can get the result to be blank if all cells are blank?
Help is appreciated!
Thanks,
philb1341