Basically, my formula works exactly how I need it to right now. However, there's still more manual entry than I'd like having to do. It's minimal, but if I can eliminate it altogether it's all the better.

My current formula is `=IFERROR(INDEX(RawData[value], MATCH(1, (RawData[plot_id]=$A2)*(RawData[class]=1)*(RawData[metric]=LEFT($B1,FIND("(",$B1)-1)), 0)),0)`

. This can be seen in the *Test Organized Tab* image below.

I still have to manually change the class number for each formula when I move it to a new column (the class number each column is searching for is the parenthetical number in that column's header: (1), (2), (5)). I've tried replacing `RawData[class]=1`

with `RawData[class]=MID(B1, SEARCH("(", B1)+1, SEARCH(")", B1) - SEARCH("(", B1) -1)`

, but it breaks the formula and will only give me the error result of 0.

However, if I use the same MID (`=MID(B1, SEARCH("(", B1)+1, SEARCH(")", B1) - SEARCH("(", B1) -1)`

) function in a cell on its own, I get exactly the result I'm looking for: the number between the parenthesis in the header cell of the column (which can be seen in cell B4 of the previously mentioned screenshot.

I'm at a loss because it allows me to successfully use the LEFT function when searching for the RawData[metric] criteria.

Any idea what's going on here or how I can get this to work?

## Raw Data Table (generic data)

metric | class | plot_id | value |
---|---|---|---|

area_mn | 1 | 1 | 0.720177968 |

area_mn | 1 | 2 | 0.005311753 |

area_mn | 2 | 1 | 0.011488774 |

area_mn | 2 | 2 | 0.435016987 |

ed | 5 | 1 | 0.1856209 |

**Screenshot for Visual Reference**

## Organized Data Table (generic data, showing desired result)

plot_id | area_mn(1) | area_mn(2) | ed(5) |
---|---|---|---|

1 | 0.720177968 | 0.01148877 | 0.720177968 |

2 | 0.005311753 | 0.435016987 | 0 |

**Screenshot for Visual Reference**

`MID`

function? So instead of`B1`

use`B$1`

? Also, don't provide your text as an image. Without any copy-pasteable table someone who wants to help needs to retype your data and formulas. That's quite a big ask. Could you edit your question to include a small example subset?`MID`

formula is a text while your`RawData[class]`

is a number, wrap your`MID`

with`VALUE`