arrays - Excel - find the minimum difference between elements in two columns that have same feature -


this first question here, apologizes if it's simple one. have following issue/goal.

i have 2 matrices:

at1                     at2         b      c           e    f      g yrs ticker  yld         yrs ticker  yld 7   ibm    4.5          6.5 ibm     1 6.5 gs      3           3   gs      2 4   msft    6           20  msft    6                        1    ibm 3 

now, need find, same ticker (let's ibm, hence column b matrix "at1", , column f matrix "at2"), minimum yield difference between ibm yields in column c , in column g, @ 1 condition though: maturity of ibm security in matrix "at1" , maturity of ibm security in matrix "at2" less 2 years.

so in example above there's once instance of ibm in matrix at1, has 7 years maturity , yield 4.5.

so 4.5 yield should compared , subtracted both ibm security yield 1 , 1 yield 3 in matrix at2 , give me minimum difference between (7-1) , (7-3).

theoretically output of array formula should give me 4, but: ibm line item yield 3 in matrix at2 has maturity = 1 year , if compare ibm security in matrix at1 maturity 7, realize maturity difference greater 2. hence answer be: 4.5 - 1 = 3.

this example of 2 matrices have , how enter image description here


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -