Oldtimer trying to learn

MarcoSicily

New Member
Joined
Sep 23, 2017
Messages
1
Hello Everyone,
I'm a rather new user to Excel but I have been learning alot through self study. I found this forum today an I am hoping someone can explain how I would develop a formula to help with analyzing stock dividend information.
I have copied and pasted stock data into the excel workbook. What I am trying to develop is a formula that will tell me how many days it will take for the daily HIGH to be equal or above the price I am buying it at. To be awarded a Dividend you must buy the stock no later than the CLOSE on the day before the Ex-Dividend day.
On the attached example The Ex-Dividend date is on Aug. 15th so we would buy the CLOSING price the day before - August 14 - which would be at a price of $15.07. As you can see the answer to my question of when we could first sell at a price of $15.07 or higher is August 30th. which equals 15 days from the buy date.
What I ultimately want to figure out is how many months can I buy the night before the Dividend and sell it at a profit or breakeven within X amount of days. Also I want to average how many days , on average , it takes to buy and sell successfully.
I would appreciate any comments that might help me accomplish this analysis.
Thank you,
Marco



DateOpenHighLowClose
15-Sep-1715.0915.1215.0915.12
14-Sep-1715.115.1215.0915.12
13-Sep-1715.1115.1115.0915.1
12-Sep-1715.0915.1115.0815.11
11-Sep-1715.0515.0915.0515.08
8-Sep-1715.0715.0815.0115.02
7-Sep-1715.115.1115.0615.09
6-Sep-1715.0915.115.0815.1
5-Sep-1715.0915.1115.0615.08
1-Sep-1715.0915.1115.0815.1
31-Aug-1715.0615.0915.0515.08
30-Aug-1715.0315.071515.04
29-Aug-171515.0514.9915.01
28-Aug-1715.0315.031515.01
25-Aug-1715.0115.0315.0115.02
24-Aug-1715.0215.031515.01
23-Aug-171515.0214.9915
22-Aug-1715.0215.041515
21-Aug-1715.0415.041515.01
18-Aug-1714.9815.0314.9715.03
17-Aug-1715.0315.0314.9814.98
16-Aug-1715.0415.0415.0115.02
15-Aug-1715.0215.021515.03
15-Aug-170.07 Dividend
14-Aug-1715.0415.0915.0215.07
11-Aug-1715.0115.0214.9615
10-Aug-1715.1115.1214.9815
9-Aug-1715.1515.1515.1115.12
8-Aug-1715.1715.1715.1415.15
7-Aug-1715.1815.215.1515.16
4-Aug-1715.1815.1815.1515.15
3-Aug-1715.1715.1815.1515.17
2-Aug-1715.1715.1815.1415.16
1-Aug-1715.1415.1715.1315.17
31-Jul-1715.1415.1515.1215.14
28-Jul-1715.1115.1315.115.12
27-Jul-1715.1315.1315.0915.09
26-Jul-1715.0815.1215.0815.12
25-Jul-1715.1515.1615.0915.09
24-Jul-1715.1415.1515.1415.15
21-Jul-1715.1315.1415.115.13
20-Jul-1715.1115.1215.0815.12
19-Jul-1715.0915.1315.0815.09
18-Jul-1715.0715.0915.0515.09
17-Jul-1715.0815.0915.0515.06
14-Jul-1715.0815.0915.0715.09
14-Jul-170.071 Dividend
13-Jul-1715.1715.1815.1315.13
12-Jul-1715.1515.1715.1115.16
11-Jul-1715.1515.1615.1215.13
10-Jul-1715.1515.1715.1415.14
7-Jul-1715.1515.1815.1315.16
6-Jul-1715.1415.1715.1215.14
5-Jul-1715.1315.1615.1115.15
3-Jul-1715.1315.1615.115.15
30-Jun-1715.115.1215.0915.11
29-Jun-1715.1215.1315.0615.09
28-Jun-1715.1115.1315.115.13
27-Jun-1715.1315.1315.115.11
26-Jun-1715.1115.1415.115.12
23-Jun-1715.0915.115.0715.1
22-Jun-1715.0615.115.0615.08
21-Jun-1715.0515.0815.0515.06
20-Jun-1715.0515.0715.0315.07
19-Jun-1715.0415.0615.0315.05
16-Jun-1715.0515.0515.0215.02
15-Jun-1715.0415.0515.0315.04
15-Jun-170.071 Dividend
14-Jun-1715.0915.1215.0815.11
13-Jun-1715.0815.0815.0515.07
12-Jun-1715.0715.0915.0515.07
9-Jun-1715.0815.115.0515.06
8-Jun-1715.0715.0815.0515.06
7-Jun-1715.0815.0915.0615.07
6-Jun-1715.0815.1115.0615.07
5-Jun-1715.0915.115.0715.08
2-Jun-1715.0815.115.0715.09
1-Jun-1715.0415.0815.0315.08
31-May-1715.0615.0615.0315.05
30-May-1715.0615.0615.0315.06
26-May-1715.0215.0615.0115.06
25-May-1715.0315.0314.9915.02
24-May-1715.0215.0314.9815.02
23-May-1714.9915.0214.9815.02
22-May-1714.9714.9914.9614.98
19-May-1714.9714.9914.9414.96
18-May-1714.9314.9714.9214.96
17-May-1714.9814.9914.9514.95
16-May-1714.9915.0114.9715.01
15-May-1714.991514.9814.99
15-May-170.071 Dividend
12-May-1715.0415.0615.0215.06
11-May-1715.0415.0415.0215.03
10-May-1715.0115.0515.0115.04
9-May-1715.0415.0415.0115.04
8-May-171515.0314.9915.03
5-May-1714.9915.0114.9614.99
4-May-1715.0115.0114.9714.99
3-May-1714.9915.0114.9715.01
2-May-1714.971514.9514.98
1-May-1714.9714.9814.9414.97
28-Apr-1714.9714.9814.9514.95
27-Apr-1714.9614.9714.9414.96
26-Apr-1714.9614.9614.9414.95
25-Apr-1714.9514.9814.9514.96
24-Apr-1714.9714.9714.9414.95
21-Apr-1714.9114.9414.914.94
20-Apr-1714.9214.9214.8914.91
19-Apr-1714.9214.9314.8914.91
18-Apr-1714.9314.9314.8914.93
17-Apr-1714.914.9414.914.94
13-Apr-1714.914.9214.8714.88
13-Apr-170.07 Dividend
12-Apr-1714.9514.9714.9314.97
11-Apr-17151514.9214.94
10-Apr-1714.951514.9514.99
7-Apr-1714.9914.9914.9514.97
6-Apr-1714.914.9714.8914.97
5-Apr-1714.9614.9814.914.91
4-Apr-1714.9314.9714.9214.95
3-Apr-1714.8614.9814.8314.95
31-Mar-1714.814.8314.7814.82
30-Mar-1714.7814.8114.7614.79
29-Mar-1714.7714.8114.7614.78
28-Mar-1714.7714.7814.7514.77
27-Mar-1714.7314.7614.7214.76
24-Mar-1714.7614.7714.7314.74
23-Mar-1714.7114.7614.6914.75
22-Mar-1714.6614.7214.6514.72
21-Mar-1714.714.714.6414.67
20-Mar-1714.6814.714.6714.69
17-Mar-1714.6914.7114.6714.69
16-Mar-1714.6414.6914.6214.67
15-Mar-1714.5214.6414.5214.64
15-Mar-170.069 Dividend
14-Mar-1714.5514.5814.5414.57
13-Mar-1714.5514.5814.5414.54
10-Mar-1714.5414.5814.514.55
9-Mar-1714.5614.5814.4914.53
8-Mar-1714.6714.6814.5814.59
7-Mar-1714.7514.7614.7114.72
6-Mar-1714.7414.7514.714.75
3-Mar-1714.7114.7514.714.74
2-Mar-1714.7214.7414.7114.72
1-Mar-1714.7514.7514.714.74
28-Feb-1714.814.814.7614.78
27-Feb-1714.814.8214.7714.79
24-Feb-1714.7714.7914.7514.78
23-Feb-1714.6914.7614.6814.76
22-Feb-1714.6614.7114.6614.68
21-Feb-1714.6814.7114.6514.68
17-Feb-1714.7114.7214.6614.66
16-Feb-1714.714.7314.6714.68
15-Feb-1714.6614.7314.6514.72
15-Feb-170.07 Dividend
14-Feb-1714.7814.7914.7114.78
13-Feb-1714.7714.7914.7314.77
10-Feb-1714.7614.7714.714.75
9-Feb-1714.7614.7814.7114.75
8-Feb-1714.7114.7814.714.75
7-Feb-1714.6914.7114.6714.71
6-Feb-1714.6414.7114.6314.68
3-Feb-1714.6114.6914.6114.63
2-Feb-1714.5614.6214.5514.6
1-Feb-1714.5814.6314.5214.56
31-Jan-1714.5614.5814.5414.57
30-Jan-1714.5414.5714.5114.54
27-Jan-1714.5314.5614.5214.54
26-Jan-1714.4914.5514.4814.51
25-Jan-1714.5114.5214.4714.49
24-Jan-1714.5214.5814.5214.54
23-Jan-1714.3814.5614.3814.54
20-Jan-1714.3714.4514.3414.43
19-Jan-1714.514.5214.3514.37
18-Jan-1714.5214.5514.514.5
17-Jan-1714.5514.5814.5114.52
13-Jan-1714.5614.5814.5114.55
13-Jan-170.07002 Dividend
12-Jan-1714.6714.6714.614.64
11-Jan-1714.5514.6514.5314.65
10-Jan-1714.5314.5714.5114.55
9-Jan-1714.5214.5614.4614.51
6-Jan-1714.514.5514.4714.51
5-Jan-1714.5414.5714.4314.5
4-Jan-1714.3314.5214.3214.52
3-Jan-1714.2214.3514.2214.3
30-Dec-1614.2414.2614.2114.23
29-Dec-1614.2114.2514.2114.23
28-Dec-1614.2114.2314.1714.21
27-Dec-1614.2514.2714.1914.23
23-Dec-1614.2514.2814.2414.25
22-Dec-1614.2114.2914.2114.23
21-Dec-1614.1314.2514.1314.23
20-Dec-1614.1114.1714.114.14
19-Dec-1614.0914.1314.0714.12
16-Dec-1614.0614.114.0414.06
15-Dec-161414.0913.9614.04
15-Dec-160.073 Dividend
14-Dec-1614.1414.1514.0914.09
13-Dec-1614.1414.1714.1114.13
12-Dec-1614.1514.1814.1114.11
9-Dec-1614.214.2414.1814.19
8-Dec-1614.2114.2814.214.21
7-Dec-1614.2414.2814.2214.23
6-Dec-1614.1714.2414.1714.2
5-Dec-1614.1614.2314.1514.18
2-Dec-1614.1814.2314.1614.18
1-Dec-1614.2114.2514.1314.17
30-Nov-1614.3214.3614.2614.27
29-Nov-1614.3714.4114.3514.38
28-Nov-1614.3814.4214.3414.4
25-Nov-1614.3614.4214.3614.36
23-Nov-1614.2514.3914.2514.37
22-Nov-1614.3414.414.3114.38
21-Nov-1614.2414.3614.2414.3
18-Nov-1614.3514.3914.2214.22
17-Nov-1614.4214.4614.3314.33
16-Nov-1614.3314.4714.3114.41
15-Nov-1614.0814.3514.0814.31
15-Nov-160.07014 Dividend
14-Nov-1614.2714.2914.0914.12
11-Nov-1614.3614.3814.2614.35
10-Nov-1614.6914.714.3814.38
9-Nov-1614.714.7814.6814.68
8-Nov-1614.8114.8514.7914.83
7-Nov-1614.8714.9314.8114.82
4-Nov-1614.7614.8214.7514.81
3-Nov-1614.8814.8814.7614.76
2-Nov-1614.9214.9414.8214.9
1-Nov-1614.9814.9914.914.93
31-Oct-1615.0315.0414.9814.98
28-Oct-1615.0715.0815.0115.02
27-Oct-1615.115.1115.0415.07
26-Oct-1615.1215.1415.115.13
25-Oct-1615.115.1415.0815.12
24-Oct-1615.115.1115.0815.09
21-Oct-1615.0215.0815.0115.07
20-Oct-1615.0115.051515.02
19-Oct-1614.9915.0614.9915.01
18-Oct-1614.9315.0414.9214.96
17-Oct-1614.9314.9514.914.9
14-Oct-1614.9114.9614.914.93
14-Oct-160.068 Dividend
13-Oct-1614.9214.9714.8514.96
12-Oct-1614.9614.9814.9214.94
11-Oct-1615.0815.0914.9714.98
10-Oct-1615.1115.1315.0815.08
7-Oct-1615.1315.1315.0815.09
6-Oct-1615.0915.1315.0715.11
5-Oct-1615.0915.1415.0815.09
4-Oct-1615.1515.1915.0915.09
3-Oct-1615.1315.1715.1115.14
30-Sep-1615.1315.1715.0715.13
29-Sep-1615.2415.2515.0715.08
28-Sep-1615.2315.2415.2215.23
27-Sep-1615.2115.2415.1715.22
26-Sep-1615.2615.2715.2115.22
23-Sep-1615.2615.2915.2315.28
22-Sep-1615.2115.2615.1915.26
21-Sep-1615.1315.1915.115.19

<colgroup><col><col><col span="3"><col></colgroup><tbody>
</tbody>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,

The most commonly used formula in Excel to look up things based on specific criteria is INDEX, it returns the contents of a cell from a range at a specific position (e.g. Nth cell in a column). That given position is usually determined using a MATCH formula, but here several other options come to play depending on what exactly you need, like MIN, MAX, LARGE, SMALL, etc...

Here's how you can use INDEX to build a monthly summary table in this example. Assume the contents of your date are named as follows.
'dates' = list of dates in first column
'open' = list of open prices, along with the Dividend info
'high' = ilst of high prices
'close' = list of close prices

div day formula, when dividend was paid that month, this is an array formula, enter using CTRL+SHIFT+ENTER
=INDEX(dates,MATCH(1,IF(ISNUMBER(SEARCH("Divid",open)),1,0)*IF(MONTH(dates)=MONTH(I3),1,0),0))

close price ex_div-1 formula, tells close price the day before ex-dividend
=INDEX(close,MATCH(J3-1,dates,0))

first same price formula, tells what is the say that is the lowest in the table, in the same month and price is >= compared to your buy price; this is also an array formula, enter using CTRL+SHIFT+ENTER
=INDEX(dates,MAX(IF(high>=K3,IF(dates>J3,ROW((INDIRECT("1:"&COUNT(dates))))))))

when you have them in row 3, just drag them down

IJKL
2div dayclose price ex_div-1first same price
301-Aug-1715/08/201715.0730/08/2017
401-Jul-1714/07/201715.1319/07/2017
501-Jun-1715/06/201715.1126/06/2017

<tbody>
</tbody>

From here you can easily calculate the difference between the two dates, averages, etc....

*edit*
For your self learning, I'd recommend INDEX, MATCH and Array formulas in general, they can be extremely powerful and in my brief experience answering questions here they solve many of the formula related questions :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top