Try:

=MAX(IF((Building Column=Building)*(Cost Center Column=Cost Cente),Number Value Range to sum all columns))

confirmed with CTRL+SHIFT+ENTER