Does anyone know the solution to the following problem?

I have data with three columns. The first column is a spatial ID column, the second a depth column. For any given ID there are multiple depth values (i.e. there are repeating ID's for a number of different depth values). The third column is a results column.

I then want to compare a given ID and depth to the 3 columns and return the result.

I want to creat a formula that compares both my ID to the ID column and my depth to the depth column to get the correct result. I've tried different vlookup, and, if, and array combinations to no avail.

anyone?

Thanks

Ian