Creating a function using zip code

Creating a function using zip code

I'm trying to create a custom function that alerts a user if there is a conflict based on zip code but have no idea where to start. I'm trying to create this based on the following rules using custom fields (which are bolded): an engagement (lead) is confirmed in the same season for the same artist and the zip code for the presenter   starts with the same three digits. Is this possible?