I have two shape files: one for the African continent, and another with cells covering the continent. However, since the cells are an arbitrary constructions, some of cells even if they are overlapping the continent, they have some part outside of it. In other words, there are some cells which have some part within the continent and another part outside the continent. Is it possible to remove the part outside of the continent?

I tried with select by location, disjoint option, and after remove the cells using toogle editing. However, this option is not working because all my cells are touching the continent as a polygon.

Please, if you do not understand the problem, ask me to clarify. I attach a picture to make it clear.

[![enter image description here](https://i.stack.imgur.com/gwHNh.png)](https://i.stack.imgur.com/gwHNh.png)

[EDIT:]

The solution of Vincé and TeddyTedTed works perfectly. However, when I do it, some borders of my map of Africa disappear or they appears with a several discontinuities. Is there any solution to this? I attach a picture to make clear the problem. Additionally, When I select some of the cells (with identify features), the discontinuities appears as a part of the cell.

[![enter image description here](https://i.stack.imgur.com/jwSs9.png)](https://i.stack.imgur.com/jwSs9.png)