Posts by asdzxc
-
-
Re: picking last data in a week (week ended Friday)
Quote from royUK;687510If you want help with PhotoShop attach an image, if you want help with Excel then attach a workbook.
attached
-
last item in we 13-9-2013 is 13-9-2013
last item in we 20-9-2013 is 13-18-2013
last item in we 4-11-2013 is 30-9-2013 as shown in the attached
Plse write a vba. -
Re: Count date Cells
Solved. thank you
-
-
vba for sum of Fridays in A2 to A6. if A2 and A3 are Friday and A4 to A6 not, the sum is 2
-
Re: delete all files except
your vba don't delete charts
-
When closing Excel, deleting all sheets except "Input"
-
Re: Compare 2 Dates In 2 Cells & Fill Down
Quote from Dave Hawley;609573Sorry, no idea what you are talking about. My code does exactly what you asked
[QUOTE]go to last date in col A and fill-down 4 cells
-
-
If date in A3 is later than in A2, go to A5 and fill-down from A5 to A10
Plse supply code. -
Re: VBA Web Query
Quoteput w or m in H1, give same result
Code
Display MoreStrURL = "URL;http://ichart.finance.yahoo.com/table.csv?s=" & [Sheet1!J1].Value & "&a=10&b=13&c=2011&d=06&e=6&f=2013&g=" & IIf(Len([H1]), "w", "m") & "&ignore=.xlsx" With ActiveSheet.QueryTables.Add(Connection:=StrURL, Destination:=Range("A1")) .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlAllTables .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .Refresh BackgroundQuery:=False End With End Sub
-
In J1, put ^dji
What's wrong with the code:CodeDim StrURL As String StrURL = "URL;http://ichart.finance.yahoo.com/table.csv?s=" & _ Worksheets("Sheet1").Range("J1").Value & "&a=10&b=13&c=2011&d=06&e=6&f=2013& " & g = "&ignore=.xlsx" If Range("H1").Value = "" Then StrURL = StrURL & "&g=w&ignore=.xlsx" Else StrURL = StrURL & "&g=m&ignore=.xlsx" End If
-
Re: compile error
put w or m in I2 but both produce daily data
[ATTACH=CONFIG]45876[/ATTACH] -
Re: compile error
Quote from cytop;609200Probably because you have embedded quote characters in the Connection property.
Not in a position to suggest the solution as I don't have access to Excel at the moment, but have a read of www.ozgrid.com/forum/showthread.php?t=61692
Thank you for your reply. Excel file attached.
-
Expected:list separator or )
original link : http://ichart.finance.yahoo.com/table.csv?s=^dji&a=08&b=13&c=2011&d=06&e=6&f=2013&g=w&ignore=.xlsx
In I2, to put d or w or m.
With Worksheets("Sheet1").QueryTables.Add(Connection:= _
"URL;http://ichart.finance.yahoo.com/table.csv?s=^dji&a=08&b=13&c=2011&d=06&e=6&f=2013&g=_
Worksheets("Sheet1").Range("I2").Value&ignore=.xlsx" _
, Destination:=Worksheets("Sheet1").Range("$A$1"))Code
Display MoreOn Error Resume Next ThisWorkbook.Connections(1).Delete Err.Clear: On Error GoTo 0 With Worksheets("Sheet1").QueryTables.Add(Connection:= _ "URL;http://ichart.finance.yahoo.com/table.csv?s=^dji&a=08&b=13&c=2011&d=06&e=6&f=2013&g=_ Worksheets("Sheet1").Range("I2").Value&ignore=.xlsx" _ , Destination:=Worksheets("Sheet1").Range("$A$1")) .Name = _ "MyData" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = 0 .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "4" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .Refresh BackgroundQuery:=False
-
In I1, put formula =HYPERLINK(J1:J4)
click on a in J4, then move to J1
Plse see attached graph -
extract data from website to excel
In I1, put formula =TEXT(J1)
In J1 ,put ^DJI,say. What's wrong with the code (red color),plse?Code
Display MoreOn Error Resume Next ThisWorkbook.Connections(1).Delete Err.Clear: On Error Goto 0 With Worksheets("Sheet1").QueryTables.Add(Connection:= _ "URL;http://ichart.finance.yahoo.com/table.csv?s=" & Cells(1, "I")&a=08&b=13&c=2011&d=06&e=6&f=2013&g=w&ignore=.xlsx" , Destination:=Range("$A$1")) .Name = _ "MyData" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = 0 .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "4" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .Refresh BackgroundQuery:=False
-
Re: extract data (attached) from website to excel
Plse see attached file. Put 14-Oct-2010 at J1 and run your macro
Result: start date 14-Oct-2011 -