In device-to-device (D2D)-enabled communications, a channel can be matched to a cellular user (CU)–D2D user (DU) pair, where either two separate resources can be allocated in a dedicated mode, or a single resource is shared in a shared mode. It affects the channel capacity and the channel bandwidth needed to guarantee the target data rate. The transmit power also needs to be adaptively controlled according to channel bandwidth, as well as channel quality. In this paper, we propose a resource allocation scheme to minimize the total channel bandwidth while guaranteeing the target data rate of guaranteed bit rate services. The original problem is separated into two sub-problems; (1) the channel bandwidth calculation and channel sharing mode selection for arbitrary matching (2) the 3-D matching problem of the CU, DU and channel. To mitigate computational complexity, the 3-D matching problem is transformed into two 2-D matching problems, and a sub-optimal solution is derived using a sub-gradient algorithm. From numerical results, it was confirmed that the average channel bandwidth was almost the same even though the computational complexity of the sub-optimal algorithm was very low compared to the original algorithm. We also investigate the impact of various parameters, such as maximum D2D distance and the number of users.