Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Seriously need help

I have asked help before about this but no one seems to know the answe
and yet I am sure that it is not that difficult:

Columm A: dates
Columm B: Stock prices
Columm C: Recommendations (ie: there is either B,S,H or TP), there i
only an entry when the recommendation was changed. Thus most of colum
C is empty.
Columm D: Target price. if there is nothing in columm C then there wil
be nothing in columm D.

I chart the columms A and B (I used VBA to do it automatically).
Now here is my query: I want to produce a code that will search colum
C and when ever it finds either a B,S,H or TP, I want it to produce
text box in columm E (I will then copy and paste Columm A, C and D
into that text box......

No one seems to know the way to do this and yet it is the sam
principal as when you run an event study with binomial parameters i
excel (where excel searches for either 0s or 1s) and then executes a
operation.)

Please can anyone help me.........I have attached the excel file. Th
graphic is what it will look like once finished....

Thanks
B

Can you in advanc

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Seriously need help

Here's an altered version of a response to your previous post:


Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range
Dim myTB As TextBox

With Worksheets("sheet2")

.TextBoxes.Delete 'delete all existing textboxes???

Set myRng = .Range("c1", .Cells(.Rows.Count, "C").End(xlUp))
For Each myCell In myRng.Cells
If InStr(1, ".b.s.h.tp.", "." & LCase(myCell.Value) & ".") = 0 Then
'do nothing
Else
With myCell.Offset(0, 2) 'column E
Set myTB = .Parent.TextBoxes.Add _
(Top:=.Top, Left:=.Left, Width:=.Width, Height:=.Height)
End With
With .Cells(myCell.Row, 1)
myTB.Text = .Text & " " & .Offset(0, 2).Text _
& " " & .Offset(0, 3).Text
End With
End If

Next myCell
End With
End Sub


"Bourbon <" wrote:

I have asked help before about this but no one seems to know the answer
and yet I am sure that it is not that difficult:

Columm A: dates
Columm B: Stock prices
Columm C: Recommendations (ie: there is either B,S,H or TP), there is
only an entry when the recommendation was changed. Thus most of columm
C is empty.
Columm D: Target price. if there is nothing in columm C then there will
be nothing in columm D.

I chart the columms A and B (I used VBA to do it automatically).
Now here is my query: I want to produce a code that will search columm
C and when ever it finds either a B,S,H or TP, I want it to produce a
text box in columm E (I will then copy and paste Columm A, C and D)
into that text box......

No one seems to know the way to do this and yet it is the same
principal as when you run an event study with binomial parameters in
excel (where excel searches for either 0s or 1s) and then executes an
operation.)

Please can anyone help me.........I have attached the excel file. The
graphic is what it will look like once finished....

Thanks
B

Can you in advance

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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"