Messages In This Digest (1 Message)
- 1a.
- Re: New but interesting question From: dguillett1
Message
- 1a.
-
Re: New but interesting question
Posted by: "dguillett1" dguillett1@gmail.com donaldb36
Sat Feb 11, 2012 5:55 am (PST)
I had a similar problem with and external query macro where Yahoo seems to be moving things around a LOT. Where I had been looking for "(" with a fixed number or rows below to get the current price (using that instead of tag since getting many things from page). They changed from 4 rows down to 3. They changed it from a week or so earlier. So, I have resorted to to loop looking for the next cell with any number. Hopefully, I can now not have to change often depending on what they do.
=================
Spectra Energy Partners, LP Com (SEP) Finding this
-NYSE
31.24 Down0.35(1.11%) 4:02PM EST Looking down to here was 4 now 3
===================== =======
Set coname = .Columns(1).Find(What: ="(" & c, LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection: =xlNext, MatchCase:=False)
If Not coname Is Nothing Then
c.Offset(, 2).Value = Left(coname, InStr(coname, "(") - 1)'gets co name wo symbol
'current price look in the next 10 rows
For i = coname.Row To coname.Row + 10
If Left(.Cells(i, 1), 1) Like "[0-9]" Then
pricerow = i
Exit For
End If
Next i
'c.Offset(, 3).Value = Left(coname.Offset(3) , InStr(coname. Offset(3) , " ")) OLD
c.Offset(, 3) = Left(.Cells(pricerow, 1), InStr(.Cells( pricerow, 1), " ")) 'NEW
'=========
Don Guillett
SalesAid Software
dguillett1@gmail.com
From: Randy H
Sent: Friday, February 10, 2012 7:47 PM
To: smf_addin@yahoogroups.com
Subject: [smf_addin] Re: New but interesting question
Typically, that's what you would do. However, the problem is that the table is not coded properly in HTML. They have tags for the end of the row, but not to start the next row.
A workaround would be to use something like:
=smfGetTagContent("http://www.bcpa. net/RecInfo. ","span",_n_asp?URL_Folio= 514112040270 ,"Subdivision Sales","Page" )
...where you would vary _n_ from 1 to whatever to get the next table cell, ignoring how the rows of the table are coded.
On Fri, Feb 10, 2012 at 6:31 PM, whitney <thelancour@yahoo.com > wrote:
thank you. If I want to go for earlier sale dates is it as simple as changing the last digit to a 2 or 3 for 2nd and 3rd row respectively? Seems to be giving me an error.......
Need to Reply?
Click one of the "Reply" links to respond to a specific message in the Daily Digest.
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Individual | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Tidak ada komentar:
Posting Komentar