回答編集履歴
1
追記
test
CHANGED
@@ -5,3 +5,31 @@
|
|
5
5
|
=IF(LEN(A2)=3,VLOOKUP(A2,抽出元データ!A:B,2,FALSE),VLOOKUP(LEFT(A2,3),抽出元データ!A:B,2,FALSE)&"+"&VLOOKUP(RIGHT(A2,3),抽出元データ!A:B,2,FALSE))
|
6
6
|
|
7
7
|
```
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
VBAを使っていいならたとえばこんな感じ。
|
14
|
+
|
15
|
+
```VBA
|
16
|
+
|
17
|
+
Public Function SAMPLEFUNC(pFind, pRange)
|
18
|
+
|
19
|
+
Dim arr, i
|
20
|
+
|
21
|
+
arr = Split(pFind.Value, "+")
|
22
|
+
|
23
|
+
For i = LBound(arr) To UBound(arr)
|
24
|
+
|
25
|
+
arr(i) = WorksheetFunction.Index(pRange, WorksheetFunction.Match(arr(i), pRange.Columns(1), False), 2)
|
26
|
+
|
27
|
+
Next
|
28
|
+
|
29
|
+
SAMPLEFUNC = Join(arr, "+")
|
30
|
+
|
31
|
+
End Function
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
```
|