In this paper, a two-phase method and a computational program to perform surgery scheduling for operating rooms in a hospital are presented. In Phase I, surgeries are assigned to operating rooms using a generalized assignment model. In Phase II, a sequence for performing surgeries in each room is established. In the proposed method, Phase I maximizes doctors’ room preferences, taking into account the time available in each room, and Phase II establishes a schedule of surgeries in the rooms, according to doctors’ preferences for periods of day. The program was written in Visual Basic for Microsoft Excel and was tested as a surgery scheduling tool at St. Lydia Hospital, Ribeirão Preto, Brazil.