If not all Exterior Walls are trimmed correctly to the Roof, and not all Interior Walls are correctly trimmed to the Ceiling first select the Walls to trim.
From the Modify Wall section in the top ribbon select “Attach Top/Base” and (with the Walls selected) select the Ceiling or Roof to trim the Walls to.