SleightOfHand
New Member
- Joined
- Jun 19, 2020
- Messages
- 17
- Office Version
- 365
- Platform
- Windows
I don't know if this is possible just with one formula; but I guess it's worth a shot.
As you can see below there is a table A1:F8. These are tables with transport Lines and their corresponding stations, and other values.
Based on separate formulas, I have extracted Lines that are relevant to me; the others I do not care about (A12:A14). As these are part of a larger table, the relevant lines need to be extracted out in all the rows.
It's fine to extract the entire row from the first bit of Line 1, but I don't know how to modify it for the second value or indeed the second line -- the issue is that there are multiple values in Column A that have duplicates, so it would need to not only match it first the first value, but also be able to 'reset' and collate the corresponding rows for the second.
If there was only a unique Line in the table itself, then it would be easy, but as there are many of the same (duplicates) I'm not sure how to allow that.
Many thanks
As you can see below there is a table A1:F8. These are tables with transport Lines and their corresponding stations, and other values.
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | LINE | Code 1 | Code 2 | Station (First) | Station (next) | Volume | |||
2 | Line 1 | 5445433 | 4433423 | Station A | Station B | 100 | |||
3 | Line 1 | 4433423 | 9484334 | Station B | Station C | 100 | |||
4 | Line 2 | 8876868 | 8549594 | Station X | Station Y | 500 | |||
5 | Line 2 | 8549594 | 4998989 | Station Y | Station AB | 500 | |||
6 | Line 4 | 9583223 | 9444954 | St. XYZ | St. ABC | 900 | |||
7 | Line 5 | 1234567 | 7898989 | Station A | Station B | 100 | |||
8 | Line 6 | 9879389 | 9584938 | Station N | Station O | None | |||
9 | |||||||||
10 | |||||||||
11 | |||||||||
12 | Line 1 | 5445433 | 4433423 | Station A | Station B | 100 | |||
13 | Line 2 | ||||||||
14 | Line 5 | ||||||||
15 | |||||||||
16 | |||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B12:F12 | B12 | =VLOOKUP($A12,$A$2:$F$8,COLUMN(B$1),FALSE) |
Based on separate formulas, I have extracted Lines that are relevant to me; the others I do not care about (A12:A14). As these are part of a larger table, the relevant lines need to be extracted out in all the rows.
It's fine to extract the entire row from the first bit of Line 1, but I don't know how to modify it for the second value or indeed the second line -- the issue is that there are multiple values in Column A that have duplicates, so it would need to not only match it first the first value, but also be able to 'reset' and collate the corresponding rows for the second.
If there was only a unique Line in the table itself, then it would be easy, but as there are many of the same (duplicates) I'm not sure how to allow that.
Many thanks