Following from .. Lookup value in table, return the cell above
Thanks for that formula. But do you know a way to achive the same workflow, if there is multiple cells with same information.
Example the datas in Sheet 1 look like this. The yellow cells will be unique and will not be multiple places. But the other cells will contain simular information.
I want to fill out to Sheet 2, that looks like this:
I want all the green cells to be filled out automatically with the search-word in the Grey cell thats right above.
The formula as it is now only fills the first name from sheet 1, in all cells. It looks like it finds the right row but it will return the first column every time.
I need it to be flexible so all cells can be searched for in every formula.
Can someone help?
Hi Peter!Here is one way (assuming values can only occur once in Column1:Column3)
21 03 23.xlsm
A B C D E F 1 Value to Search Result: Column1 Column2 Column3 2 abc ipsum hello ipsum filler 3 def world world abc text 4 ghi here def lorem here 5 random word ghi Cell above
Cell Formulas Range Formula B2:B4 B2 =INDEX(D:F,AGGREGATE(15,6,ROW(D$2:F$5)/(D$2:F$5=A2),1)-1,AGGREGATE(15,6,(COLUMN(D$2:F$5)-COLUMN(D2)+1)/(D$2:F$5=A2),1))
Thanks for that formula. But do you know a way to achive the same workflow, if there is multiple cells with same information.
Example the datas in Sheet 1 look like this. The yellow cells will be unique and will not be multiple places. But the other cells will contain simular information.
hjelp.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Unit 1, Outputs | 1 | 2 | 3 | 4 | 5 | 6 | |||||
2 | Jon | Jon | Mark | Mark | Chris | Chris | ||||||
3 | #1 | #2 | #3 | #4 | #5 | #6 | ||||||
4 | U1 | U1 | U1 | U1 | U1 | U1 | ||||||
5 | Unit 1 | Unit 1 | Unit 1 | Unit 1 | Unit 1 | Unit 1 | ||||||
6 | Cable1.1 | Cable1.2 | Cable2.1 | Cable2.2 | Cable3.1 | Cable3.11 | ||||||
7 | Unit 2, Outputs | 1 | 2 | 3 | 4 | 5 | 6 | |||||
8 | Peter | Jon | Mark | Chris | Jon | Peter | ||||||
9 | #7 | #8 | #9 | #10 | #11 | #12 | ||||||
10 | U2 | U2 | U2 | U2 | U2 | U2 | ||||||
11 | Unit 2 | Unit 2 | Unit 2 | Unit 2 | Unit 2 | Unit 2 | ||||||
12 | Cable1.3 | Cable1.7 | Cable2.3 | Cable2.4 | Cable3.9 | Cable3.4 | ||||||
13 | Unit 3, Outputs | 1 | 2 | 3 | 4 | 5 | 6 | |||||
14 | Chris | Mark | Peter | Hans | Mark | Jon | ||||||
15 | #13 | #14 | #15 | #16 | #17 | #18 | ||||||
16 | U3 | U3 | U3 | U3 | U3 | U3 | ||||||
17 | Unit 3 | Unit 3 | Unit 3 | Unit 3 | Unit 3 | Unit 3 | ||||||
18 | Cable1.5 | Cable1.8 | Cable2.8 | Cable2.6 | Cable3.10 | Cable3.6 | ||||||
Sheet1 |
I want to fill out to Sheet 2, that looks like this:
Cell Formulas | ||
---|---|---|
Range | Formula | |
C1,C23,C12 | C1 | =RIGHT($B1,20)&"."&"1" |
D1,D23,D12 | D1 | =RIGHT($B1,20)&"."&"2" |
E1,E23,E12 | E1 | =RIGHT($B1,20)&"."&"3" |
F1,F23,F12 | F1 | =RIGHT($B1,20)&"."&"4" |
G1,G23,G12 | G1 | =RIGHT($B1,20)&"."&"5" |
H1,H23,H12 | H1 | =RIGHT($B1,20)&"."&"6" |
C2:H2,C7:H7,C24:H24,C29:H29,C13:H13,C18:H18 | C2 | =IFERROR(INDEX(Sheet1!$E:$J,AGGREGATE(15,6,ROW(Sheet1!$E$1:$J$500)/(Sheet1!$E$1:$J$500=C1),1)-4,AGGREGATE(15,6,(COLUMN(Sheet1!$E$1:$J$500)-COLUMN(Sheet1!$E$1:$J$500)+1)/(Sheet1!$E$1:$J$500=C1),1)),"") |
C3:H3,C8:H8,C25:H25,C30:H30,C14:H14,C19:H19 | C3 | =IFERROR(INDEX(Sheet1!$E:$J,AGGREGATE(15,6,ROW(Sheet1!$E$1:$J$500)/(Sheet1!$E$1:$J$500=C1),1)-3,AGGREGATE(15,6,(COLUMN(Sheet1!$E$1:$J$500)-COLUMN(Sheet1!$E$1:$J$500)+1)/(Sheet1!$E$1:$J$500=C1),1)),"") |
C4:H4,C9:H9,C26:H26,C31:H31,C15:H15,C20:H20 | C4 | =IFERROR(INDEX(Sheet1!$E:$J,AGGREGATE(15,6,ROW(Sheet1!$E$1:$J$500)/(Sheet1!$E$1:$J$500=C1),1)-2,AGGREGATE(15,6,(COLUMN(Sheet1!$E$1:$J$500)-COLUMN(Sheet1!$E$1:$J$500)+1)/(Sheet1!$E$1:$J$500=C1),1)),"") |
C5:H5,C10:H10,C27:H27,C32:H32,C16:H16,C21:H21 | C5 | =IFERROR(INDEX(Sheet1!$E:$J,AGGREGATE(15,6,ROW(Sheet1!$E$1:$J$500)/(Sheet1!$E$1:$J$500=C1),1)-1,AGGREGATE(15,6,(COLUMN(Sheet1!$E$1:$J$500)-COLUMN(Sheet1!$E$1:$J$500)+1)/(Sheet1!$E$1:$J$500=C1),1)),"") |
C6,C28,C17 | C6 | =RIGHT($B1,20)&"."&"7" |
D6,D28,D17 | D6 | =RIGHT($B1,20)&"."&"8" |
E6,E28,E17 | E6 | =RIGHT($B1,20)&"."&"9" |
F6,F28,F17 | F6 | =RIGHT($B1,20)&"."&"10" |
G6,G28,G17 | G6 | =RIGHT($B1,20)&"."&"11" |
H6,H28,H17 | H6 | =RIGHT($B1,20)&"."&"12" |
I want all the green cells to be filled out automatically with the search-word in the Grey cell thats right above.
The formula as it is now only fills the first name from sheet 1, in all cells. It looks like it finds the right row but it will return the first column every time.
I need it to be flexible so all cells can be searched for in every formula.
Can someone help?
Attachments
Last edited by a moderator: