ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA-Graphic (https://www.excelbanter.com/excel-programming/287294-vba-graphic.html)

Bourbon[_4_]

VBA-Graphic
 
My table looks like this (in excel). I wrote the code to create a
graphic using columm A and B. What I want to do is a code that will
search columm C (Recommendation) and when it finds an entry (B, S, H OR
TP), creates a text box with the date from the corresponding row, the
recommendation-Target price....The attached file shows and manualy done
preview....

Can anyone help me?
Regards,
Bourbon



Date Price Recommendation Target
10/6/00 33.25
10/13/00 33.25
10/20/00 44.95
10/27/00 39.5
11/3/00 48.75 B 10.00
11/10/00 46.225
11/17/00 41.8
11/24/00 38
12/1/00 30.625
12/8/00 31.35
12/15/00 30
12/22/00 31
12/29/00 34.4
1/5/01 31.5
1/12/01 28.75
1/19/01 31.75
1/26/01 35
2/2/01 36
2/9/01 33.375
2/16/01 31.5
2/23/01 29.375 B 12.00
3/2/01 33.5
3/9/01 34.745
3/16/01 32.775
3/23/01 30
3/30/01 31.25
4/6/01 29.125
4/13/01 32.625
4/20/01 33
4/27/01 33.25
5/4/01 34.45
5/11/01 36.45 S 10.00
5/18/01 37.425
5/25/01 36.5
6/1/01 36.25
6/8/01 35.35
6/15/01 35
6/22/01 37.275
6/29/01 39.725
7/6/01 39.76
7/13/01 38.755
7/20/01 40.5 H 5.00
7/27/01 40
8/3/01 41.305
8/10/01 40.585
8/17/01 38.05
8/24/01 43.925
8/31/01 44.2
9/7/01 29.245
9/14/01 23.75
9/21/01 28.2 TP 15.00
9/28/01 34.035
10/5/01 35.195
10/12/01 34.26
10/19/01 33.68
10/26/01 36.825
11/2/01 38.57
11/9/01 35.445
11/16/01 39.625
11/23/01 39.495
11/30/01 43.335
12/7/01 41
12/14/01 39.085
12/21/01 41.625
12/28/01 44.6
1/4/02 43.125
1/11/02 43.375
1/18/02 42.94
1/25/02 43
2/1/02 44.32
2/8/02 42.75
2/15/02 42.65
2/22/02 42.67
3/1/02 32.55
3/8/02 36.625
3/15/02 36.65
3/22/02 37.345
3/29/02 36.3
4/5/02 36
4/12/02 35.545
4/19/02 36.875
4/26/02 31.05
5/3/02 31.255
5/10/02 31.325
5/17/02 33.375
5/24/02 33.125
5/31/02 30.505
6/7/02 31.485
6/14/02 30
6/21/02 31
6/28/02 28.345
7/5/02 28
7/12/02 26
7/19/02 26.89 TP 20.00
7/26/02 29.365
8/2/02 34.55
8/9/02 35.025
8/16/02 34.875
8/23/02 35.15
8/30/02 35.1
9/6/02 34.845
9/13/02 33.8
9/20/02 32.23
9/27/02 31.235
10/4/02 28.1
10/11/02 26.625
10/18/02 27.875
10/25/02 30.865
11/1/02 28.7
11/8/02 28.725
11/15/02 27.79
11/22/02 29.445
11/29/02 29.75
12/6/02 28.905
12/13/02 27.625
12/20/02 26.55
12/27/02 26.95
1/3/03 28.225
1/10/03 26.75
1/17/03 25.76
1/24/03 27.75
1/31/03 27.775
2/7/03 27.35
2/14/03 27.235
2/21/03 27.78
2/28/03 29.225
3/7/03 29.4
3/14/03 31.25
3/21/03 33.5
3/28/03 29.08
4/4/03 31.91
4/11/03 31.5
4/18/03 30.97
4/25/03 33.45
5/2/03 34.65
5/9/03 35.11
5/16/03 38.6
5/23/03 39
5/30/03 40.76
6/6/03 44.48
6/13/03 54.6
6/20/03 53.5
6/27/03 56.55
7/4/03 57.75
7/11/03 60.02
7/18/03 56.35
7/25/03 58.95
8/1/03 61.41
8/8/03 61.3
8/15/03 62.5
8/22/03 62.75
8/29/03 59.51
9/5/03 53.5
9/12/03 59.65
9/19/03 65.35
9/26/03 60.16
10/3/03 62.11
10/10/03 56.82
10/17/03 56
10/24/03 56.54
10/31/03 60.02
11/7/03 56.35
11/14/03 58.95
11/21/03 61.41
11/28/03 61.3
12/5/03 62.5
12/12/03 62.75
12/19/03 59.51
12/26/03 53.5
1/2/04 59.65
1/9/04 65.35
1/16/04 60.16
1/23/04 62.11
1/30/04 56.82
2/6/04 56
2/13/04 56.54
2/20/04 62.5
2/27/04 62.75
3/5/04 59.51
3/12/04 53.5
3/19/04 59.65
3/26/04 65.35
4/2/04 60.16
4/9/04 62.11
4/16/04 56.82
4/23/04 56
4/30/04 56.54
5/7/04 60.02
5/14/04 56.35
5/21/04 58.95
5/28/04 61.41
6/4/04 61.3
6/11/04 62.5
6/18/04 62.75
6/25/04 59.51
7/2/04 53.5
7/9/04 59.65
7/16/04 65.35
7/23/04 60.16
7/30/04 62.11
8/6/04 56.82
8/13/04 56
8/20/04 56.54
8/27/04 53.5 B 15.00
9/3/04 59.65
9/10/04 65.35
9/17/04 60.16
9/24/04 62.11
10/1/04 56.82
10/8/04 56
10/15/04 56.54
10/22/04 60.02
10/29/04 56.35
11/5/04 58.95
11/12/04 61.41
11/19/04 61.3
11/26/04 62.5
12/3/04 62.75
12/10/04 59.51
12/17/04 53.5
12/24/04 59.65
12/31/04 65.35
1/7/05 60.16
1/14/05 62.11
1/21/05 56.82
1/28/05 56
2/4/05 56.54 TP 25.00
2/11/05 56.35
2/18/05 58.95
2/25/05 61.41
3/4/05 61.3
3/11/05 62.5
3/18/05 62.75
3/25/05 59.51
4/1/05 53.5
4/8/05 59.65
4/15/05 65.35
4/22/05 60.16
4/29/05 62.11
5/6/05 56.82
5/13/05 56
5/20/05 56.54
5/27/05 62.11
6/3/05 56.82
6/10/05 56
6/17/05 56.54
6/24/05 56.35
7/1/05 58.95
7/8/05 61.41
7/15/05 61.3
7/22/05 62.5
7/29/05 62.75
8/5/05 59.51
8/12/05 53.5
8/19/05 59.65
8/26/05 65.35
9/2/05 60.16
9/9/05 62.11
9/16/05 56.82
9/23/05 56
9/30/05 56.54

Attachment filename: test-macro.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=401652
---
Message posted from http://www.ExcelForum.com/


Bourbon[_5_]

VBA-Graphic
 
I just looked at my message and noticed that the table I included was
changed. Evidently, the dates are in the date columm, the prices are
under the price columm, the B,S,H,TP are under the recommendation
columm and the target are the last numbers.....

Sorry, i could not copy it directly from excel.....

Regards


---
Message posted from http://www.ExcelForum.com/


Jon Peltier[_4_]

VBA-Graphic
 
Bourbon -

Email me off line to remind me to answer this post. (My lunch hour just
ended.)

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Bourbon < wrote:

My table looks like this (in excel). I wrote the code to create a
graphic using columm A and B. What I want to do is a code that will
search columm C (Recommendation) and when it finds an entry (B, S, H OR
TP), creates a text box with the date from the corresponding row, the
recommendation-Target price....The attached file shows and manualy done
preview....

Can anyone help me?
Regards,
Bourbon



Date Price Recommendation Target
10/6/00 33.25
10/13/00 33.25
10/20/00 44.95
10/27/00 39.5
11/3/00 48.75 B 10.00
11/10/00 46.225
11/17/00 41.8
11/24/00 38
12/1/00 30.625
12/8/00 31.35
12/15/00 30
12/22/00 31
12/29/00 34.4
1/5/01 31.5
1/12/01 28.75
1/19/01 31.75
1/26/01 35
2/2/01 36
2/9/01 33.375
2/16/01 31.5
2/23/01 29.375 B 12.00
3/2/01 33.5
3/9/01 34.745
3/16/01 32.775
3/23/01 30
3/30/01 31.25
4/6/01 29.125
4/13/01 32.625
4/20/01 33
4/27/01 33.25
5/4/01 34.45
5/11/01 36.45 S 10.00
5/18/01 37.425
5/25/01 36.5
6/1/01 36.25
6/8/01 35.35
6/15/01 35
6/22/01 37.275
6/29/01 39.725
7/6/01 39.76
7/13/01 38.755
7/20/01 40.5 H 5.00
7/27/01 40
8/3/01 41.305
8/10/01 40.585
8/17/01 38.05
8/24/01 43.925
8/31/01 44.2
9/7/01 29.245
9/14/01 23.75
9/21/01 28.2 TP 15.00
9/28/01 34.035
10/5/01 35.195
10/12/01 34.26
10/19/01 33.68
10/26/01 36.825
11/2/01 38.57
11/9/01 35.445
11/16/01 39.625
11/23/01 39.495
11/30/01 43.335
12/7/01 41
12/14/01 39.085
12/21/01 41.625
12/28/01 44.6
1/4/02 43.125
1/11/02 43.375
1/18/02 42.94
1/25/02 43
2/1/02 44.32
2/8/02 42.75
2/15/02 42.65
2/22/02 42.67
3/1/02 32.55
3/8/02 36.625
3/15/02 36.65
3/22/02 37.345
3/29/02 36.3
4/5/02 36
4/12/02 35.545
4/19/02 36.875
4/26/02 31.05
5/3/02 31.255
5/10/02 31.325
5/17/02 33.375
5/24/02 33.125
5/31/02 30.505
6/7/02 31.485
6/14/02 30
6/21/02 31
6/28/02 28.345
7/5/02 28
7/12/02 26
7/19/02 26.89 TP 20.00
7/26/02 29.365
8/2/02 34.55
8/9/02 35.025
8/16/02 34.875
8/23/02 35.15
8/30/02 35.1
9/6/02 34.845
9/13/02 33.8
9/20/02 32.23
9/27/02 31.235
10/4/02 28.1
10/11/02 26.625
10/18/02 27.875
10/25/02 30.865
11/1/02 28.7
11/8/02 28.725
11/15/02 27.79
11/22/02 29.445
11/29/02 29.75
12/6/02 28.905
12/13/02 27.625
12/20/02 26.55
12/27/02 26.95
1/3/03 28.225
1/10/03 26.75
1/17/03 25.76
1/24/03 27.75
1/31/03 27.775
2/7/03 27.35
2/14/03 27.235
2/21/03 27.78
2/28/03 29.225
3/7/03 29.4
3/14/03 31.25
3/21/03 33.5
3/28/03 29.08
4/4/03 31.91
4/11/03 31.5
4/18/03 30.97
4/25/03 33.45
5/2/03 34.65
5/9/03 35.11
5/16/03 38.6
5/23/03 39
5/30/03 40.76
6/6/03 44.48
6/13/03 54.6
6/20/03 53.5
6/27/03 56.55
7/4/03 57.75
7/11/03 60.02
7/18/03 56.35
7/25/03 58.95
8/1/03 61.41
8/8/03 61.3
8/15/03 62.5
8/22/03 62.75
8/29/03 59.51
9/5/03 53.5
9/12/03 59.65
9/19/03 65.35
9/26/03 60.16
10/3/03 62.11
10/10/03 56.82
10/17/03 56
10/24/03 56.54
10/31/03 60.02
11/7/03 56.35
11/14/03 58.95
11/21/03 61.41
11/28/03 61.3
12/5/03 62.5
12/12/03 62.75
12/19/03 59.51
12/26/03 53.5
1/2/04 59.65
1/9/04 65.35
1/16/04 60.16
1/23/04 62.11
1/30/04 56.82
2/6/04 56
2/13/04 56.54
2/20/04 62.5
2/27/04 62.75
3/5/04 59.51
3/12/04 53.5
3/19/04 59.65
3/26/04 65.35
4/2/04 60.16
4/9/04 62.11
4/16/04 56.82
4/23/04 56
4/30/04 56.54
5/7/04 60.02
5/14/04 56.35
5/21/04 58.95
5/28/04 61.41
6/4/04 61.3
6/11/04 62.5
6/18/04 62.75
6/25/04 59.51
7/2/04 53.5
7/9/04 59.65
7/16/04 65.35
7/23/04 60.16
7/30/04 62.11
8/6/04 56.82
8/13/04 56
8/20/04 56.54
8/27/04 53.5 B 15.00
9/3/04 59.65
9/10/04 65.35
9/17/04 60.16
9/24/04 62.11
10/1/04 56.82
10/8/04 56
10/15/04 56.54
10/22/04 60.02
10/29/04 56.35
11/5/04 58.95
11/12/04 61.41
11/19/04 61.3
11/26/04 62.5
12/3/04 62.75
12/10/04 59.51
12/17/04 53.5
12/24/04 59.65
12/31/04 65.35
1/7/05 60.16
1/14/05 62.11
1/21/05 56.82
1/28/05 56
2/4/05 56.54 TP 25.00
2/11/05 56.35
2/18/05 58.95
2/25/05 61.41
3/4/05 61.3
3/11/05 62.5
3/18/05 62.75
3/25/05 59.51
4/1/05 53.5
4/8/05 59.65
4/15/05 65.35
4/22/05 60.16
4/29/05 62.11
5/6/05 56.82
5/13/05 56
5/20/05 56.54
5/27/05 62.11
6/3/05 56.82
6/10/05 56
6/17/05 56.54
6/24/05 56.35
7/1/05 58.95
7/8/05 61.41
7/15/05 61.3
7/22/05 62.5
7/29/05 62.75
8/5/05 59.51
8/12/05 53.5
8/19/05 59.65
8/26/05 65.35
9/2/05 60.16
9/9/05 62.11
9/16/05 56.82
9/23/05 56
9/30/05 56.54

Attachment filename: test-macro.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=401652
---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com