Thanks... The row and column headers in your exhibit appear to have trailing spaces. If this is really the case in your sheet, try to run the TrimAll macro to remove them.
So I am working on this, but there are leading single quotes, then spaces, then the text to search on.
Example: ' Salary
One does not see the quote in the cell unless the cell is selected. Then it appears in the edit box and in the cell being edited. Does this affect what is being attempted here?
Sheet1, A1:N18...
Snip....brevity. I renamed the sheets in question Sheet1 and Sheet2 to make things a little more uniform and streamlined. I also deleted row 1 which is/was blank in the example given and the real spreadsheet.
Create a 4-row range on a convenient place with the following entries:
Air Travel
|
Other T&E
|
Training
|
Recruiting/Relocation
|
<TBODY>
</TBODY>
Select this range and name it Categories.
Rockfish>> Done and have tried them with the leading single quote & spaces and without. No Joy.
Sheet2, A:C, shows example processing...
| | Q1
|
| | Actual
|
Belgium
| Training
| 8
|
| | |
<TBODY>
</TBODY>
C3, control+shift+enter, not just enter:
Rich (BB code):
=INDEX(Sheet1!$C$3:$N$18,
MATCH($A3,Sheet1!$A$3:$A$18,0)+(MATCH($B3,Categories,0)-1),
MATCH(1,IF(Sheet1!$C$1:$N$1=$C$1,IF(Sheet1!$C$2:$N$2=C$2,1)),0))
As you see, it's a conceptually similar solution as before. This one has to do with two sets of column headers.