The increasing trends of energy demand and renewable integration call for new and advanced approaches to energy management and energy balancing in power networks. Utilities and network system operators require more assistance and flexibility shown from consumers in order to manage their power plants and network resources. Demand response techniques allow customers to participate and contribute to the system balancing and improve power quality. Traditionally, only energy-intensive industrial users and large customers actively participated in demand response programs by intentionally modifying their consumption patterns. In contrast, small consumers were not considered in these programs due to their low individual impact on power networks, grid infrastructure and energy balancing. This paper studies the flexibility of aggregated demands of buildings with different characteristics such as shopping malls, offices, hotels and dwellings. By using the aggregated demand profile and the market price predictions, an aggregator participates directly in the day-ahead market to determine the load scheduling that maximizes its economic benefits. The optimization problem takes into account constraints on the demand imposed by the individual customers related to the building occupant comfort. A case study representing a small geographic area was used to assess the performance of the proposed method. The obtained results emphasize the potential of demand aggregation of different customers in order to increase flexibility and, consequently, aggregator profits in the day-ahead market.