Without parsing out that entire formula, and without worrying about the 255 length yet, I see at least one problem:

LR_Formula = "=IFERROR(IF(ROWS($A$5:A5)>SUM(IF(FREQUENCY(IF(INDIRECT($B$1)<>"",MATCH(INDIRECT($B$1),INDIRECT($B$1),0)),ROW(INDIRECT($B$1))-ROW($M$17)+1),1)),"",INDEX(INDIRECT($B$1),SMALL(IF(FREQUENCY(IF(INDIRECT($B$1)<>"",MATCH(INDIRECT($B$1),INDIRECT($B$1),0)),ROW(INDIRECT($B$1))-ROW($M$17)+1),ROW(INDIRECT($B$1))-ROW($M$17)+1),ROWS($A$5:A5)))),"")"

To define a string, you put it between quote marks (") which I've marked in red. If you want to include a quote mark within your string, you need to double it ("") so that Excel recognizes that it's part of the string, and not a delimiter. If you have 2 quote marks together, which I've marked in blue, you need to double each one, meaning you need to use """" instead for all the marked sections.

Check Rick's comments in posts 3 and 4 of this thread for a more detailed explanation:

http://www.mrexcel.com/forum/excel-q...iven-cell.html

As far as the length, that's a thornier question.

## Like this thread? Share it with others