I have data in columns C & D. A range of ten students in A1 to A10 are identified with roll numbers. In Column C and corresponding Column D, there are 8 students from roll number 1 to 8 (Column C) and their marks (Column D). 

I need a formula in column B to automatically extract the marks from column D against the roll numbers in Column A and the two cells in column B (marks of roll number 9 & 10) may remain blank. 

Any Excel formula or VBA macro solution is much appreciated. 

```

Column-A     Column-B      Column-C      Column-D
1             50            1           50
2             55            2           55
3             35            3           35
4             60            4           60
5             78            5           78
6             45            6           45
7             39            7           39
8             82            8           82
9
10
```