I'm putting together a stock summary of all the desks in the office and any spares, but I'm trying to work a function out on a test table and not really getting close; I'm also a bit new to excel. Here's a simple example of the type of thing I'm working with:
I want this function to look across the header row, look at the department (let's choose "Call Centre") and return a total of how many desks have a phone (where "x" means yes (this can be changed if it helps)).
Knowing I'll probably chop and change the order of items, it would make more sense if it were to look for "Phone" in the header rather than write a function to search in a specific range of cells.
I'm not sure if I'm being too ambitious with this idea, but any help would be grateful.

I want this function to look across the header row, look at the department (let's choose "Call Centre") and return a total of how many desks have a phone (where "x" means yes (this can be changed if it helps)).
Knowing I'll probably chop and change the order of items, it would make more sense if it were to look for "Phone" in the header rather than write a function to search in a specific range of cells.
I'm not sure if I'm being too ambitious with this idea, but any help would be grateful.