I've come to a halt on a text file project, maybe someone can shed some light on my next steps.

2 questions using the following example, assume this data is in column A and appears many times with different numeric values beyween Data and Data1.

Data
1
1a
2
3
3a
4
5
6
7
8
9
Data1

1 - I need to create a macro that finds the first appearance of Data and counts the number of cells between Data and Data 1. If there are less than 8 no action is taken and it moves onto the next appearance of Data.

2 - If 8 or more cells are present, the macro extracts the value of 3 pre-identified cells and pastes their value in the 3 adjecent columns next to the cell containing the word Data.

The pre-identified cells, as an example could be, A=1st value after Data, B=4th value after data and C=5th value after data. In this case the result would be 1 3 3a


Any help or advice will be greatly appreciated.

Bill