# Matching numbers

#### Stclements1

##### Board Regular
 1 2 2 3 4 5 6 6 7 8 9 9 550 800 800 1400 1600 1600 1800 2000 2550 2800 3600 4000

<colgroup><col width="64" span="12" style="width:48pt"> </colgroup><tbody>
</tbody>

I want to write some syntax that allows the numbers on line 1 from 1-9 to match the numbers on line 2 from 550-4000
thus if cell a1 has 4 cell a2 would read 1600

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### WaterGypsy

##### Well-known Member
Have you considered HLOOKUP ?

#### joeu2004

##### Well-known Member
I presume you have some typos in the example, to wit: the combination of 2 and 800 appears twice; and 9 is associated with two different values, namey 3600 and 4000.

Assuming the correct pairs are unique and they are in B1:M2, you might try the following in A2:

=HLOOKUP(A1, \$B\$1:\$M\$2, 2, 0)

#### Fluff

##### MrExcel MVP, Moderator

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Replies
4
Views
67
Replies
4
Views
195
Replies
3
Views
77
Replies
9
Views
61
Replies
9
Views
73