I'm trying to return the value of a cell when a match is found. I'm using the cells position to determine the return value. The position of the cell value is always the same RELATIVE to another criteria (ie TYPE II CO, REPASS, etc), which is why i'm using match, address, and offset. All of the code works so far except the last section (offset). The offset works for one position, but I want to position to vary based on the match.
Here is my code so far:
IF(AND(VLOOKUP(B20,A1:A16,1,TRUE),INDIRECT(ADDRESS(MATCH(B20,A1:A16,0)+1,1))="blank", INDIRECT(REPLACE(ADDRESS(MATCH(B20,A1:A16,0)+1,2),1,3,"B"))="TYPE II CO"),OFFSET(B4,-2,7,1,1),"nope")
My problem/question:
I want the reference cell in offset to be the position of a matched cell, however I get the following error when I try and input the position formula into offset "error..... too many arguments". I then tried to use the formula separately and feed offset the position of the cell, but offset is interpreting the actual position of the cell, not the referenced position (value) inside the cell.
How do I get offset to accept the position value inside a cell and not use the actual position of the cell?
Thanks, Let me know if the situation is not clear.Offset_Code_excelforums.xlsx
Bookmarks