Excel question: Now I have two columns, A is the building number and B is the room number. I want to know what to do if the building number is the same as the room number.

It is most convenient to select house numbers by rows, by columns, and by statistical methods. The count is 1 or the repeated room number, and the count-1 is the number of repetitions.

Look at the attached drawings, simple and clear.