To solve the issue you need to create a Helper Column in Sheet 1.
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/xOPMD.png)
Formula in Cell D2
& fill it Down.
=IF(C2="M",1+MAX($D$1:D1),"")
Write this Formula in Cell A2 of Sheet 2
& fill it Right then Down.
=IFERROR(INDEX(Sheet1!A:A,MATCH(ROWS($1:1),Sheet1!$D:$D,0)),"")
How it works:
This simple INDEX & MATCH combination did the magic & Filters all Rows have Gender M
.
Where MATCH(Rows($1:1)
, returns 1
and as soon drag down it completes, 1, 2, 3, 4 , 5
& 6
and so on, and the Formula uses these values to Match
& Filter
Rows for M
.
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/Mi3Hq.png)
Note:
- You can find New Records (Red Color) in the 2nd Screen Shot been filtered also in Sheet 2.
- Formula in Sheet 2 will reflect modifications in Gender also.
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/9vCt3.png)
- Name I's gender (Filled with Yellow color) been modified, excluded by the formula in Sheet 2.
- Adjust Cell references in the Formula as needed.