I have a datasheet with 3 criteria. Cost Center, Employee Level, and work country. The sheet looks a little something like this 

```
                Australia     China      Hong Kong     India
All    L10      10,000       10,001       10,003       10,004
All    L11      9,000         9,001        9,002        9,003
C9620  L10      10,005       10,006       10,007       10,008
C9620  L11      9,005        9,006        9,007         9,008

```

I have 50 countries, 100+ cost centers, and 10 levels for each cost center. 

I am moving the data to another format where it is listed in column form. The salary column has my formula and only works for cost center "all" for all the countries. I believe the issue lies in the Cost center.

```
Country     Cost Center    Level    Salary
Australia      All          L10       10,000
Australia      C952         L10       #N/A
Austraila      C845         L10       #N/A
China          All          L10       10,001
China          C952         L10       #N/A
China          C845         L10       #N/A

```

I have used an array formula to get my answer. 
-`Median Salary by Cost Center'!$B$14:$B$1682 = Cost Centers`
-`Logic Board'!$G14 = Cost Center`
-`Logic Board'!$H14 = Employee Level`
-`Median Salary by Cost Center'!$C$13:$AR$1698 = All Data`
-`Logic Board'!$E14 = Country`
-`Median Salary by Cost Center'!$C$13:$AT$13 = Country`

`=VLOOKUP(IF('Median Salary by Cost Center'!$B$14:$B$1682='Logic Board'!$G14,'Logic Board'!$H14,"NA"),'Median Salary by Cost Center'!$C$13:$AR$1698,MATCH('Logic Board'!$E14,'Median Salary by Cost Center'!$C$13:$AT$13,0),FALSE)`

The expected result has the salary column populated all the way down. Currently it only works for cost center "All". All other cost centers come up with an #N/A

Any ideas would be much appreciated.