How can I split a wall by a surface?

In order to split a wall by a surface you need to do the following:
  1. Duplicate the wall and the surface
  2. Extrude one surface in one direction to create a solid of subtraction and do the same with the other surface in the opposite direction
  3. Subtract the solids from each respective wall
  4. Move the copied wall in its former position, next to the other piece of wall