Ident time alt lat lon
a334 0.33 2000 45 51
a336 0.33 2500 44 50
a788 0.33 5000 44 25
a521 0.33 1000 49 10
a852 0.4 2000 45 3
a956 0.5 100 20 30
a841 0.55 8000 20 63
a965 0.6 8000 24 65


I need a formula that recognizes identical times then takes the difference between the altitude, lat, long of the two identical times.

So ideally the calculation that would be performed.

Ident (a334)-(a336) 2000-2500 45-44 51-50
Ident (a334)-(a788) 2000-5000 45-44 51-25
Ident (a334)-(a521) 2000-1000 ''''''' ''''''''''
Ident (a336)-(a788) 2500-5000 '''''' '' ''''
Ident (a336)-(a521) 2500-1000
Ident (a788)-(a521) 5000-1000

I created a pivot table to try to calculate the difference but it cannot do it an a algorithmic type fashion like this. Then eventually I need to conditionally format it to if all three meet a certain criteria that it will put it in a separate chart only if all three conditions are met.

So if Ident (a334)-(a336) 500 1 1 (ex. of all three criteria being met [actual parameters not important but these values will be flagged in my conditional formatting])

This needs to then be put in a separate chart with all other data that meets all three criteria.

So the steps I need to perform this function:

1. Does Ident "x" equal Ident "y" time?

Yes: Take difference between all three parameters. Do all three meet Criteria?

Yes: Put all calculated info in separate chart if they meet all three criteria. Does Ident "x" time equal Ident "z" time?

Yes: Take difference between all three parameters. Do all three meet Criteria?

No: End

Yes: Put all calculated info in separate chart if they meet all three criteria. Does Ident "x" time equal Ident "aa" time?

No: End

No: End

No: Move on to does Ident "y" time equal Ident "z" time?

[Rinse, Wash, Repeat]Generic Algorithim.xlsx