put =if(A1="XXXX","YYYY","") in B1 and copy down
ok, try vlookup() with a table like this
A B C D E 1 1905 0105 WO PO 2 1901 0101 3 1902 0102 4 1903 0103 5 1904 0104 6 1905 0105 7 1906 0106 8 1907 0107 9 1908 0108 10 1909 0109 11 1910 0110 12 1911 0111 13 1912 0112 14 1913 0113 15 1914 0114 16 1915 0115 17 1916 0116 18 1917 0117
<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>Sheet1
Worksheet Formulas
Cell Formula B1 =VLOOKUP(A1,$D$2:$E$18,2,FALSE)
<thead>
</thead><tbody>
</tbody>
<tbody>
</tbody>
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | 1905 | 0105 | ||
2 | 1917 | 0117 | ||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | =VLOOKUP(A1,Table,2,FALSE) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
Table | =Sheet4!$A$1:$B$18 |
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | WO | PO | ||
2 | 1901 | 0101 | ||
3 | 1902 | 0102 | ||
4 | 1903 | 0103 | ||
5 | 1904 | 0104 | ||
6 | 1905 | 0105 | ||
7 | 1906 | 0106 | ||
8 | 1907 | 0107 | ||
9 | 1908 | 0108 | ||
10 | 1909 | 0109 | ||
11 | 1910 | 0110 | ||
12 | 1911 | 0111 | ||
13 | 1912 | 0112 | ||
14 | 1913 | 0113 | ||
15 | 1914 | 0114 | ||
16 | 1915 | 0115 | ||
17 | 1916 | 0116 | ||
18 | 1917 | 0117 | ||
Sheet4 |