I have columns in which I need to find a matching key value. When a key value is found, I want to loop through all the rows in that column, log the values and the values of the next two columns to the right.
For example, in the for loop, it found the first matching value in column 10.
[row,col10],[row,col11],[row,col12]
[row+1,col10],[row+1,col11],[row+1,col12]
[row+2,col10],[row+2,col11],[row+2,col12]
Then when all values in the first matching column have been logged, the loop will proceed to the next column with a matching key value and repeat the process. The key value is always the same, but it could appear multiple times in a row in different columns.
I’m new to coding, so I’m sorry if I don’t have much information.
Please check the photo for reference.
I searched StackOverflow, Youtube, and Google for answers.
Dorcas Domingo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.