A machine for putting lids on boxes of different formats, the lids being made of cardboard sheets, wherein the machine comprises a sheet capturing device, a guide for placing the sheets deposited by the sheet capturing device, a pusher configured to transfer the sheets from the guide to a work area intended for placing the lids on the corresponding boxes and a gluing device configured to apply glue on the sheet, the machine being characterised in that: - it comprises two sheet inlet areas with the corresponding sheet stacking areas, each sheet stacking area being located on one side of the sheet capturing device, - it comprises two second closing male elements in the work area, - the guide comprises two brackets for placing the sheets, - the sheet capturing device in turn comprises: - a head configured like a grid comprising a segment and fixing arms attached to the segment, wherein suction cups are located in the arms, - a rotation lever, attached to the head, which is activated by a mechanism adapted to transmit the rotation movement to the head, and - a casing including a track, wherein: - the track of the casing is configured to fit on a rail along which it is adapted to slide, - the brackets of the guide are attached to an additional rail along which they are adapted to slide, - the suction cups are located in two opposite planes of the head, - the closing male elements are adapted abte- to move, such that: - the sheet capturing device is configured to move between the two sheet stacking areas, - the brackets of the guide are configured to move relative to each other to adapt to the size of the sheet to be accommodated, - each of the two closing male elements is configured to be positioned aligned with the guide to work on the sheet, - the capturing device is configured to move along the rail between the two sheet stacking areas, to capture a sheet and rotate to deposit the sheet in the guide which is subsequently transferred to the work area by the pusher so that the corresponding closing male element places it on the box placed to receive a lid. - it comprises two sheet inlet areas with the corresponding sheet stacking areas, each sheet stacking area being located on one side of the sheet capturing device, - it comprises two second closing male elements in the work area, - the guide comprises two brackets for placing the sheets, - the sheet capturing device in turn comprises: - a head configured like a grid comprising a segment and fixing arms attached to the segment, wherein suction cups are located in the arms, - a rotation lever, attached to the head, which is activated by a mechanism adapted to transmit the rotation movement to the head, and - a casing including a track, - a head configured like a grid comprising a segment and fixing arms attached to the segment, wherein suction cups are located in the arms, - a rotation lever, attached to the head, which is activated by a mechanism adapted to transmit the rotation movement to the head, and - a casing including a track, - the track of the casing is configured to fit on a rail along which it is adapted to slide, - the brackets of the guide are attached to an additional rail along which they are adapted to slide, - the suction cups are located in two opposite planes of the head, - the closing male elements are adapted abte- to move, - the sheet capturing device is configured to move between the two sheet stacking areas, - the brackets of the guide are configured to move relative to each other to adapt to the size of the sheet to be accommodated, - each of the two closing male elements is configured to be positioned aligned with the guide to work on the sheet, - the capturing device is configured to move along the rail between the two sheet stacking areas, to capture a sheet and rotate to deposit the sheet in the guide which is subsequently transferred to the work area by the pusher so that the corresponding closing male element places it on the box placed to receive a lid.