The #REF! error value occurs when a cell reference is not valid.
It can be caused in this case by the use of COLUMN() if your column offset is not the same in your lookup and reference table. That can be adjusted with COLUMN()+/-Value, i.e. Column()+1. Or just use the actual column count. In this case, 8.
Hope that helps,