I have a student attendance [data sheet](https://docs.google.com/spreadsheets/d/1kHj5YBcrgh8pmf2Wpvqr-2fDtZr6likRYYZ8EferRYk/edit?usp=sharing) in which I need each student's name to appear in Column A, but only where the row for that student contains a subject. As you can see, I'm nearly there. In cell A4 I typed: 

```
=B3

```

and in cell A5 I typed:

```
=IF(B4="",A4,B4)

```

...then just autofilled down from there. However, cells A17 and A31 (where a new student name appears on Column B) are messing up a formula I have on another sheet that references Column A on this sheet. Therefore, I'd like to leave these particular cells blank if possible, but I'm not sure how to achieve this.