This paper deals with the minimization of a building's external wall thermal transmittance, with the aim of improving the energy efficiency of the building. The wall's thermal transmittance must abide by the current legislation, but also suit the limitations of other construction parameters, mainly budget and thickness, but also time limit, workforce, number and thickness of the layers and availability of materials depending on the approach. The optimization is achieved formulating an Integer Linear Programming (ILP) problem involving the parameters mentioned above. Therefore, any available ILP solver can be run to obtain the best combination of the different materials and thicknesses for the layers, in order to minimize the thermal transmittance. This paper presents a case study of a common but representative external wall consisting of 6 layers, with more than 670,000 possible combinations of materials and their thicknesses. The study concludes with a comparison of the lowest thermal transmittance obtained for a selection of budget and thickness combinations for the mentioned wall.