View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Divide # by portion of the day??? compare to previous total co

As you don't appear to be getting any responses here I suggest that you try
the programming group microsoft.excel.programming

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"nastech" wrote in message
...
hi, Thankyou & thanks for the replies, appreciated; got some of what
working
on from your examples. (work doing makes me look like higher speed than I
am.. putting much effort into sheet). sending sheet might not be
neccessary
unless your into code. have a separate problem there. this was about the
final detail to work out before requesting code assistance, else if you
have
someone to recommend.

updated shorter version of answer is: (workday stops at 1600 hours,
volume
would artificially / wrongfully inflate past orginal set level with
original
formula, if not checked at 1600); formula is:

=((MIN($DC$3,TIME(16,0,0))-"9:30")/("16:00"-"9:30"))*$M$4

believe it took ~ 2 years to figure that out? nuts :)

code working on is in one sheet, gets 200 lines max, must copy-paste
results.
want to combine with main sheet. will need to include some items like a
time stamp put in $DC$3; combining this code into my sheet makes every
thing
disappear upon hitting download button....

Otherswise, thanks very much.

-----

Sub GetData()

Dim QuerySheet As Worksheet
Dim DataSheet As Worksheet
Dim qurl As String
Dim i As Integer

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual

Set DataSheet = ActiveSheet

Range("C4").CurrentRegion.ClearContents
i = 4
qurl = "http://finance.yahoo.com/d/quotes.csv?s=" + Cells(i, 1)
i = i + 1
While Cells(i, 1) < ""
qurl = qurl + "+" + Cells(i, 1)
i = i + 1
Wend
qurl = qurl + "&f=" + Range("A1")
'place string in cell:
Range("v1") = qurl
QueryQuote:
With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=DataSheet.Range("C4"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Range("C4").CurrentRegion.TextToColumns
Destination:=Range("C4"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, other:=False

'turn calculation on
Application.Calculation = xlCalculationAutomatic
Application.DisplayAlerts = True
Columns("C:C").ColumnWidth = 5.14
'place cursor in cell:
Range("C4").Select

End Sub