Search in 2 kolumns and 1 row

G

Guest

I have this problem.

I want to search i this table where 2 kolumns must match and 1 row.
Year and Week must match with station

YEAR WEEK Station1 Station2 Station3
1950 1 6,5 6,1 96,8
1950 2 6,2 5,9 94,9
1950 3 6,0 5,8 93,3
1950 4 6,0 5,8 93,7
1950 5 6,0 5,9 94,9
1950 6 6,0 6,0 95,4
1950 7 5,9 6,0 95,4
1950 8 5,9 6,0 95,9
1950 9 5,8 6,0 96,2
1950 10 5,7 6,0 96,2
1950 11 5,7 6,1 96,8
1950 12 5,6 6,1 97,1
1950 13 5,1 5,6 91,0
1950 14 5,0 5,6 90,9
1950 15 5,0 5,6 90,6
1950 16 4,2 4,8 81,5
1950 17 2,3 2,8 51,3
1950 18 0,8 1,3 29,2
1950 19 0,0 0,6 27,2
1950 20 0,0 0,5 23,9
1950 21 0,0 0,3 14,8
1950 22 0,0 0,4 18,8
1950 23 0,0 0,5 34,0
1950 24 0,0 0,3 23,2
1950 25 0,0 0,4 26,2
1950 26 5,8 5,0 95,6
1950 27 7,8 12,3 98,1
1950 28 6,5 5,6 98,1
1950 29 3,6 3,1 66,7
1950 30 6,8 5,7 98,1
1950 31 7,8 6,6 98,1
1950 32 4,7 4,0 78,9
1950 33 4,5 3,8 76,3
1950 34 3,6 3,1 66,1
1950 35 4,3 3,8 75,5
1950 36 6,7 5,8 92,9
1950 37 5,6 5,0 82,8
1950 38 5,4 4,8 79,8
1950 39 5,6 5,0 82,6
1950 40 5,8 5,2 87,0
1950 41 5,6 5,1 85,3
1950 42 5,3 4,8 80,7
1950 43 5,2 4,7 79,1
1950 44 5,7 5,1 86,0
1950 45 6,4 5,8 93,1
1950 46 6,3 5,8 93,4
1950 47 6,4 5,9 94,8
1950 48 6,4 6,0 95,7
1950 49 6,3 6,0 95,7
1950 50 5,9 5,7 92,3
1950 51 6,0 5,9 94,4
1950 52 6,0 5,9 94,8
1951 1 5,9 5,9 93,5
1951 2 5,8 5,8 93,9
1951 3 5,6 5,7 92,9
1951 4 5,6 5,8 93,7
1951 5 5,5 5,8 93,3
1951 6 5,6 5,9 94,4
1951 7 5,5 5,9 94,4
1951 8 5,5 6,0 95,8
1951 9 5,5 6,0 95,8
1951 10 5,4 6,0 96,1
1951 11 5,4 6,1 96,7
1951 12 5,3 6,0 96,4
1951 13 4,8 5,6 90,6
1951 14 4,8 5,6 90,8
1951 15 4,5 5,4 88,3
1951 16 4,7 5,6 90,8
1951 17 4,2 5,1 86,1
1951 18 2,6 3,3 59,4
1951 19 0,0 0,3 14,5
1951 20 0,0 0,4 16,6
1951 21 0,0 0,4 16,5
1951 22 0,0 0,3 13,4
1951 23 0,0 0,3 22,9
1951 24 0,0 0,3 23,3
1951 25 0,0 0,3 23,6
1951 26 0,0 0,3 25,0
1951 27 0,0 0,4 26,8
1951 28 0,0 0,4 26,7
1951 29 0,0 0,3 25,2
1951 30 0,0 0,3 25,3
1951 31 0,0 0,3 23,5
1951 32 0,2 0,4 23,9
1951 33 0,3 0,5 24,6
1951 34 0,1 0,3 22,8
1951 35 0,7 0,9 29,5
1951 36 3,8 3,4 57,4
1951 37 4,2 3,7 62,4
1951 38 4,3 3,9 64,6
1951 39 4,5 4,1 67,3
1951 40 5,8 5,5 89,0
1951 41 5,4 5,3 87,5
1951 42 5,4 5,3 87,7
1951 43 5,3 5,3 87,2
1951 44 4,6 4,6 75,6
1951 45 5,6 5,6 90,6
1951 46 5,4 5,5 89,5
1951 47 4,9 5,1 84,5
1951 48 5,2 5,4 88,3
1951 49 5,6 5,9 93,9
1951 50 5,4 5,7 92,5
1951 51 5,4 5,8 92,8
1951 52 5,3 5,8 92,6

Can someone help me ? With the function.
 
A

Aladin Akyurek

Assuming that the sample is in B:F, with labels in B1:F1...

In A2 enter & copy down:

=B2&"#"&C2

then invoke:

=VLOOKUP(Year&"#"&Week,$A$2:$F$1000,MATCH(Station,$$A$1:$F$1,0),0)
 
M

Max

One way

Assume the source table is in Sheet1, in A1:E105

In Sheet2
-----------
In A1:C1 are the headers: YEAR, WEEK, Station
and search data will be input from row2 down
in A2:C2, A3:C3, etc, for example:

1950 4 1
1950 5 2
1950 6 3

(Station number will be entered as either: 1, 2 or 3 in col C)

Put in the formula bar for D2, and array-enter
(press CTRL+SHIFT+ENTER):

=OFFSET(Sheet1!$B$2:$B$105,MATCH(A2&"_"&B2,Sheet1!$A$2:$A$105&"_"&Sheet1!$B$
2:$B$105,0)-1,C2)

Copy D2 down

Col D will return the results from Sheet1
corresponding to the inputs in cols A to C

For the sample data, you'll get:

1950 4 1 6,0
1950 5 2 5,9
1950 6 3 95,4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top