Hello everyone,

I would just like to ask help if there's any way where this code below

=IF(ISERROR(INDEX('MY SF1.xls'!$A$7:$A$2063,LARGE(INDEX(('MY SF1.xls'!$G$7:$G$2063="M")*ROW(INDIRECT("1:"&ROWS('MY SF1.xls'!$G$7:$G$2063))),0),COUNTIF('MY SF1.xls'!$G$7:$G$2063,"M")-ROWS(B$11:B11)+1))),"",INDEX('MY SF1.xls'!$A$7:$A$2063,LARGE(INDEX(('MY SF1.xls'!$G$7:$G$2063="M")*ROW(INDIRECT("1:"&ROWS('MY SF1.xls'!$G$7:$G$2063))),0),COUNTIF('MY SF1.xls'!$G$7:$G$2063,"M")-ROWS(B$11:B11)+1)))
would be re-edited to a simpler code (or possible vba code). The code's original intent and function is to:

1. Fetch the value of a certain cell if it fits the condition found on a cell of the same row.
2. Copies/Fetches the value if it meets that condition successively without skipping rows.

thanks a lot