Overview:I am trying to use INDIRECT combined with INDEX, ROW and COLUMN to get a dynamic table working.
Problem:
- For each cell of a given column in Worksheet1, read the content of the cell to its left.
- Compare the content of a column from Worksheet2 to the read one .
- For each match, get the value of a variable from Worksheet2 .
- Evaluate the max of the found values, copy it into Worksheet1 original cell.
How I'm doing it (Wrong, apparently):
{=MAX(IF('Worksheet 2'!$A$4:$A$101=INDIRECT(ADDRESS(ROW();COLUMN()-1;4)); 'Worksheet 2'!$D$4:$D$101))}
What I would expect it to do:
INDIRECT(ADDRESS(ROW();COLUMN()-1;4))
--- Read content to the cell on the left in Worksheet 1'Worksheet 2'!$A$4:$A$101=INDIRECT(ADDRESS(ROW();COLUMN()-1;4))
--- Get an array of TRUE/FALSE values, where TRUE is found where Worksheet 2 column A contains the value previouslIF('Worksheet 2'!$A$4:$A$101=INDIRECT(ADDRESS(ROW();COLUMN()-1;4)); 'Worksheet 2'!$D$4:$D$101)
--- For each TRUE, extract the corresponding value from COLUMN D of Worksheet 2{=MAX(IF('Worksheet 2'!$A$4:$A$101=INDIRECT(ADDRESS(ROW();COLUMN()-1;4)); 'Worksheet 2'!$D$4:$D$101))}
--- From the COLUMN D extracted values, take the MAX
What I get: A #VALUE! Error.
Can somebody explain me why and propose a feasible substitution?