Yes, I gather the header text is in F but the key is - is there logic by which the header rows can be determined (other than that they are the first row of the named range)...
For sake of illustration of my thinking... let's "assume" F is blank other than for header rows... you could achieve your results using formulae as so
=LOOKUP(REPT("Z",255),F1:INDEX(F:F,ROW(INDIRECT(M1))))
the above would find the last value in F up to an including the row as determined by range reference in M1.
Now in reality the above logic may not be in place but there may be other logical rules by which we can determine as and where the header rows are located.
Bookmarks