kumar1893,
The solution depends on how you are entering the values in A! and A2. Are they strings or numbers. if they are numbers are the values always 367,some number,50. If so them just subtract 367150 from the value entered, if the result is zero you have a match and you would output Yes to the cell your display cell, if it is not zero then you do not have a match and you would output NO to your display cell. If the numbers can be anything and all you care about is if the fourth digit is a 1, One, then things get real complicated real quickly. If however, you are entering these values as strings, then just use any of the sting manipulation functions, Left(), Mid(), or Right() functions to determine what is in the fourth position and again output a Yes or No depending on what is found.
Hope that helps,
Computerman