Hi all,
Suppose I have a spreadsheet that looks something like this
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]File1004[/TD]
[TD="align: right"]"Input Cell" ->[/TD]
[TD]1006[/TD]
[/TR]
[TR]
[TD]File1005[/TD]
[TD="align: right"]"Return Occurrence" ->[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]File1006[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]File1007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]etc.[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a formula in C2 that looks through column A to find the cell that contains "File"&C1. This can be done easily by using an Index Match formula (=INDEX(A:A,MATCH("*"&C1,A:A,0))).
What I need it to return, however, is what occurrence of "File*" has just been found. This could be done using another MATCH formula if they were sequential and the first file began on row 1. Unfortunately, there is other stuff in column A between the "File*" cells. In my previous example, there could be two rows between "File1004" and "File1005." Then six rows between "File 1005" and "File 1006".
To summarize: I need a formula in C2 that says "Cell C1 is 1028. "File1028" is the 37th occurrence of "File*" in column A if counting from the top. Return value "37".
Thank you all for any help! I hope I explained that well. I'm happy to clarify if you have any questions.
Suppose I have a spreadsheet that looks something like this
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]File1004[/TD]
[TD="align: right"]"Input Cell" ->[/TD]
[TD]1006[/TD]
[/TR]
[TR]
[TD]File1005[/TD]
[TD="align: right"]"Return Occurrence" ->[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]File1006[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]File1007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]etc.[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a formula in C2 that looks through column A to find the cell that contains "File"&C1. This can be done easily by using an Index Match formula (=INDEX(A:A,MATCH("*"&C1,A:A,0))).
What I need it to return, however, is what occurrence of "File*" has just been found. This could be done using another MATCH formula if they were sequential and the first file began on row 1. Unfortunately, there is other stuff in column A between the "File*" cells. In my previous example, there could be two rows between "File1004" and "File1005." Then six rows between "File 1005" and "File 1006".
To summarize: I need a formula in C2 that says "Cell C1 is 1028. "File1028" is the 37th occurrence of "File*" in column A if counting from the top. Return value "37".
Thank you all for any help! I hope I explained that well. I'm happy to clarify if you have any questions.