I am trying to build a formula in excel to pass two text values to match in a list and find number of cells between them. The count needs to go in sequence 1 to 27 and if one variable is at 27 row and the other on 6th row then the count should be (27, 1, 2, 3, 4, 5, 6).
I have two columns, ColA with sequence number and ColB with text. I am using another two columns to reference the text in ColB as a list to select two variables.
I am then using index formula to pull the index number from the ColA and then using the index to create the dynamic range and count the number of cells between the two however, not getting anywhere.
here are my formulas For index =INDEX($E$4:$F$30, MATCH(I3,$F$4:$F$30,0),1) For count = =COUNT(INDIRECT("E"&J3&":E"&J4))
I am sure there is a better way to go about this but i am drawing blanks and hope someone can help me out.
Your helps is greatly appreciated.
Thanks
(27, 1, 2, 3, 4, 5, 6)
should the result be 7? Or 6? Or even 5?