Two novel ternary intermetallic compounds Ce23Ru7In4 and Pr23Ru7In4 were synthesized by arc melting of components and subsequent annealing at 600 degrees C. Both compounds crystallize in a hexagonal cell, with structure type Pr23Ir7Mg4, space group P6(3)mc (& numero; 186), Pearson symbol hP68, Z = 2, the cell parameters: a = 9.861(5) & Aring;, c = 22.520(12) & Aring; (Ce); a = 9.9260(7) & Aring;, c = 22.4109(2) & Aring; (Pr). The structure of Ce23Ru7In4 was determined by single-crystal X-ray diffraction and the structure of Pr23Ru7In4 was determined by the Rietveld method using powder X-ray diffraction pattern. Compound Ce23Ru7+xIn4-x exist in the homogeneity range 0 <= x <= 3. An essential feature of compound Ce23Ru7In4 is the presence of abnormally short distances Ce-Ru (2.637 & Aring;, 2.735 & Aring;). The compound Pr23Ru7In4 melts incongruently and compound Ce23Ru7In4 melts congruently at temperatures 756 and 683 degrees & Scy; respectively. The Pr23Ru7In4 compound is characterized by the presence of a magnetic transition at 12 K. The observed magnetic transition is most likely indicative of a transition to the spin glass state.