
Originally Posted by
zeddy
Hi
See attached file for another method.
This uses a formula to return an array:
=OFFSET($A$1,0,MATCH(A2,1:1,FALSE)-1,4,2)
The value in A2 is the name you are looking for in row 1 (exact match) i.e. the (MATCH(A2,1:1,FALSE) bit.
For example, this will return 9 for Bob, i.e. Bob is in column 9.
The offset function then says, starting from the cell I specify (in this case cell $A$1):
Go down 0 rows, move to the right 8 columns (i.e. 9 - 1),
..then return a block which is 4 rows deep by 2 cols wide.
If you copy the formula above into any cell, then highlight the entire formula in the formula bar and then press [F9], you will see the array result displayed in the formula bar.
You could use a similar formula for your second name.
Does this help?
zeddy