When a date with same year and month is found, it would return the value two columns right.
What does ''return the value two column to the right" mean? Do you want to write a formula in one cell and get the desired value in some other cells if the conditions are satisfied? It is not possible to write a formula in one cell and get the value in another cell.
If you require the output in the fashion which i had mentioned then the situation can either be handled using VBA or please change your data in the form of a table.

Please let me know if my understanding is wrong.