Let b be the number of students that were in each bus, since 111 students were on the trip, 23 students rode in cars, and the rest filled 4 buses, then we can set the following equation:
[tex]111=23+4b\text{.}[/tex]Subtracting 23 from the above equation we get:
[tex]\begin{gathered} 111-23=23+4b-23, \\ 88=4b\text{.} \end{gathered}[/tex]Dividing the above equation by 4 we get:
[tex]\begin{gathered} \frac{88}{4}=\frac{4b}{4}, \\ b=22. \end{gathered}[/tex]Answer: 22 students.