The purpose of this paper is to illustrate a procedure that permits, starting from a sufficiently long database of time series, the construction of a Reference Year (RY) of hourly weather data according to the rules of ISO 15927-4 standard. In order to facilitate the management of the weather database and to allow the users to easily generate
the file, an algorithm has been implemented in Microsoft Visual Basic for Application (VBA). By this way, the application of the ISO 15927-4 is possible even using a popular software tool such as Microsoft Excel or Access without any other expensive specialized software. Such tool allows to
fulfil all the procedures mentioned in ISO 15927- 4 giving as result a time series of 8760 values of several weather variables, ready to be used in any software for energy simulation of buildings