Excel formula requested for Open interest movers

goyalsr

New member
Joined
Jan 20, 2016
Messages
15
Reaction score
0
Points
0
Stocks nameStrikeTypeDateOpen interest changeName of stockOpen Interest mover strike today Type
YESBANK 680CE 1/12/2016YESBANK 680CE
YESBANK 680CE 1/19/20165000000Adani Port210CE
YESBANK 680PE 1/12/2016
YESBANK 680PE 1/13/2016700
YESBANK 680PE 1/15/2016-1400
YESBANK 680PE 1/18/20167000
YESBANK 680PE 1/19/2016-700
YESBANK 680PE 1/12/201640600
YESBANK 720CE 1/15/20167000
YESBANK 720CE 1/18/20169100
YESBANK 720CE 1/19/2016-58100
YESBANK 720PE 1/18/2016
YESBANK 720PE 1/12/2016-3500
YESBANK 720PE 1/13/2016-2100
YESBANK 720PE 1/14/2016-1400
YESBANK 720PE 1/15/2016-2800
YESBANK 720PE 1/18/2016-2100
YESBANK 720PE 1/19/2016-4200
ADANIPORTS205PE 1/15/20160
ADANIPORTS205PE 1/18/201614400
ADANIPORTS205PE 1/19/20163200
ADANIPORTS210CE 1/18/2016
ADANIPORTS210CE 1/15/2016
ADANIPORTS210CE 1/18/201620800
ADANIPORTS210CE 1/19/201620000000
ADANIPORTS210PE 1/18/2016
ADANIPORTS210PE 1/19/20161600


hi friends i have an excel data as above , for the above i want to search open interest mover for the today(here i suppose it 1/19/2016). My definition for open interest mover is open interest added on 01.19.2016 exceeds open interest on that stock in all the dates in which data is available( here data is available from 01.12.2016 to 01.19.2016(last date).The Output of the formula for the stock is mentioned in separate column shown I and J. I have data for many such stocks and new rows are getting added each day in the table. For example for stock named yes bank Highest open interest added is in the row E10. Can some expert help me to write the formula for column I and J as shown.iF there is no output then formula(in case the highest open interest added today (01.09.2015) is not maximum of all the data then should print an error message as "sorry".
Thanks all
 
Assumptions:

1. Name of Stock in column H matches exactly names in column A
2. Date of interest is in L1 (you can enter formula in L1: =TODAY() for today's date)

Do this:

In another cell, say M1, enter formula: =MATCH(REPT("z",255),A:A)
This determines the last row in column A, so that we can set a moving range size for the array formula we need for the final results.

Now in I2 enter formula:

=IFERROR(INDEX(B$2:INDEX(B:B,$M$1),MATCH(1,($A$2:INDEX($A:$A,$M$1)=$H2)*($D$2:INDEX($D:$D,$M$1)=$L$1)*($E$2:INDEX($E:$E,$M$1)=MAX(IF(($A$2:INDEX($A:$A,$M$1)=$H2)*($D$2:INDEX($D:$D,$M$1)=$L$1),$E$2:INDEX($E:$E,$M$1)))),0)),"Sorry")

confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down and over to column J.
 
Thanks Sir for your help.I applied the formula a small amendment is requested.The Logic i am looking for is Match names in column H with column A and find maximum of column D and column E in which contents of A,H matched . If the row numbers of maximum of column D and E match then our output should be contents of column B,C in column I,J. Mistake is mine that i could not write the exact wording of my requirement.
Thanks and best regards
 
See attached for my interpretation. Is it correct?
 

Attachments

  • ExcelGuruSample1.xlsx
    9.9 KB · Views: 27
Thanks sir for your reply and devoting your valuable time. My observation is here http: //imgur. com/uW5EaGP
(Please remove space before com and after double colon ,as forum rule is not allowing me to update a image/file )
 

Attachments

  • Reply to forum.jpg
    Reply to forum.jpg
    106.1 KB · Views: 25
Ok.

Try:

=IF(MAX(IF(($A$2:INDEX($A:$A,$M$1)=$H2),$E$2:INDEX($E:$E,$M$1)))=MAX(IF(($A$2:INDEX($A:$A,$M$1)=$H2)*($D$2:INDEX($D:$D,$M$1)=$L$1),$E$2:INDEX($E:$E,$M$1))),INDEX(B$2:INDEX(B:B,$M$1),MATCH(1,($A$2:INDEX($A:$A,$M$1)=$H2)*($D$2:INDEX($D:$D,$M$1)=$L$1)*($E$2:INDEX($E:$E,$M$1)=MAX(IF(($A$2:INDEX($A:$A,$M$1)=$H2)*($D$2:INDEX($D:$D,$M$1)=$L$1),$E$2:INDEX($E:$E,$M$1)))),0)),"Sorry")

confirmed with CTRL+SHIFT+ENTER and copy down and over.

 
See attached.
 

Attachments

  • ExcelGuruSample1.xlsx
    10 KB · Views: 24
Thanks Sir, its perfect> I love Excelguru. Warm Regards
 
Back
Top