Historical Stock Prices
Jul 24, 2008how do i download historical stock prices for approx a hundred stocks i.e what code would suffice?
View 9 Replieshow do i download historical stock prices for approx a hundred stocks i.e what code would suffice?
View 9 RepliesI am looking for this one function i need for a school project on historical stock prices in excel.....basically i need a way to perform this function:
In row 1, i have 30 RANDOM historical dates, starting in B1 and going right
In column A, i have 10 stock symbols, starting in A2 and going down
Is there a way to automatically grab the ADJUSTED CLOSING PRICE for each symbol for each corresponding date?? if not i have to do it manually!!
How to loop a macro which downloads historical stock information into Excel. I had the macro working for a single sheet, but I want it to update all of the sheets in the work book except a few. Now I keep getting a Error # 1004 unable to open error on line .Refresh BackgroundQuery:=False
Code:
Sub GetData()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
' Exclude certain sheets
If ws.Name "Porfolio" Or ws.Name "Benchmark" Then
[Code]....
QueryQuote:
With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl, Destination:=DataSheet.Range("A5"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
[Code]....
I have a script that pulls my stock prices every minute and update an excel page I've created...basically an excel stock portfolio...the problem I'm running into is when a stock is unchanged...instead of being $0.00 it returns "unch"...as you can imagine this throws my calculations into chaos...I have the following formula but it doesn't seem to be working =IF(J18<0,R18*J18,(IF(J18>0,R18*J18,0)))
Basically J18 is the returned change in stock price...R18 is the number of shares held...how can I get it to view "unch" as $0.00?
I have data on my excel spread but can not transform them into continuously compounded monthly returns.
View 1 Replies View RelatedWhat is the easiest way to have a cell update with real time stock quotes for a particular stock?
View 4 Replies View RelatedI have created a stock sheet on Sheet1, i have say 100 items and each item has a min and max stock order. Once the item hits a min low, the last cell (O) will display an order needs to be placed.
I was wondering if there way a way that on sheet2, it can calculate all the data on sheet1 and if there is stock that needs to be ordered, it will appear on sheet2?
This way i can just print sheet2 and send it to the supplier without having the entire 100 items displayed -if it does not need to be ordered?
Forecasting using historical seasonally effected data
I organize my thoughts in numbers so it will be easier to understand.
[1] Say I have this data from January 2009 to December 2009:
1-4-7-10-13-14-15-16-18-20-22-25
As you can see, the growth is not linear.
[2] So then, I start with this data point for Janaury 2010.
26-a-b-c-d-f-g-h-i-j-k-l
[3] I now want to forecast that data point for the rest of 2009...using the growth in [1]. SO i guess that's an easy task right? Take the percentage change from Jan 08 and Feb 08...and apply that to the 26...and so on. (am i correct here at least).
[4] But lets say we have a GOAL. So, this become a forecast/plan. In December 2010, i want to grow double the amount of that in December 09. So 25 x 2 = 50. Now, the "known" data is like this:
26-a-b-c-d-f-g-h-i-j-k-50
So how do i do this now?
In the attachment you will see an example of what I am trying to accomplish. What I am trying to do is find VBA code that will move data by date from an (Entry) sheet to a (Historical) sheet. I want to enter a date in B3 on the (Entry) sheet. I then enter data into C3. What I would like to happen is when the data is entered into C3 the sheet goes and finds the same date that I entered in B3 and copies that data from C3 into Column E of the (Historical) sheet.
Test3.xlsm
In the attachment you will see an example of what I am trying to accomplish. What I am trying to do is find VBA code that is either specific to this worksheet or in a macro. When the sheet is opened I enter a date in B2. I then enter data into A7, B7, and C7. What I would like to happen is when the data is entered into A7, B7, and C7 the sheet goes and finds the same date that I entered in B2 and copies that data from A7, B7, and C7 into F7, G7, and H7.
View 2 Replies View RelatedI am looking at trying to do a complex rounding within Excel. I have a spreadsheet of all my product with my cost. I then convert to show what margin I want to sell my items at and then round to .99.
What I am looking at doing is getting my pricing more uniform so that instead of having 23.99, it is 24.99 or 20.99 it is 19.99. I want all the numbers in the ones' spot to round depending on a set parameter.
I have played around with if statements, but can not get it to work fully. Basically if the ONES number is 0 to 2 I want it to round down to 9.99 (ie first was 21.99 I want it to be 19.99) from 2.01 to 4.98 to round to 4.99 and then 5.00 to 9.98 round up to 9.99.
I have a spreadsheet with rows of entries that are listed by date. I would like to create anther worksheet where i can refer back to the other sheet and calculate the total prices per work week. Is there a way to do this using a function(s)?
View 14 Replies View RelatedI have to update our ticker(US and Can stock) prices manually in our portfolio system.
I use www.bigcharts.com as our source . I can import the file in Excel. So what I would like to do is update the prices in Excel from the bigcharts.com. Not just today's prices but prices from previous day or two as well. Once I go to the website, I click historical quotes, then type in the stock symbol, and the date ,then write down the price.
Would Excel web query be the best way to approach this? If so, how would I import the the price for that particualr ticker for that date from the website into my excel?
Refer to the attached sample workbook,
(Keep in mind that there is an error in the sample workbook; Im not sure how to remove and re-attach the sample workbook as this is my first day on this forum.)
Cell F19 should contain =D19*B19
Column 1- These values will not change and represent price/cost of each UNIT
Column 2- "UNITS" the quantity or number of items at column1 value
Column 3- "$ AMT" the total cost of UNITS at that price/cost, i.e. Column1*Column2
Im looking for a way populate the values in Column2 when, "NUMBER OF UNITS" AND "AVERAGE COST PER UNIT" are changed
Ideally speaking, As few units in one row as possible to allow for a good mix.
For example: What i don't want is $9000*86 for 774k.
If it helps: "AVERAGE COST PER UNIT" will always be a whole number rounded up to the nearest 1000.
I believe a Most Even distribution of units will work fine.
After the distribution/population of fields in column2;
D29 must equal F3
F29 must equal F7
I'm looking for something that will populate the values in D12:D27 while adhering to the two conditions above. Even when the Input at F3 and F4 are changed.
The values in "UNITS" represent the number of a specific cost item in inventory when added together do not exceed the "TOTAL COST OF INVENTORY". Depending on store location, the "AVERAGE COST PER UNIT" and/or the "NUMBER OF UNITS" will change. It will be used to help forecast how many of a specific cost item should be purchased based on the overall average unit cost without exceeding the budget or inventory space.
I am trying to have a Vlookup Macro to add all the prices for a certain product in different tabs.
VB:
Private Sub CommandButton1_Click() 'Generate Info Button
Dim ws As Worksheet
Dim ISSUEPRICE As Integer
Dim RESULT As Integer
Dim sheet As Worksheet
For Each ws In ThisWorkbook.Worksheets
[Code] ......
I have a sheet with a price list of papers and sizes. I then use this list to calculate the price of each order. It's a basic VLOOKUP and it returns the price. (this is the section outlined in blue on the demo).
However, i now want to add on another section so that if the order has Lamination (Gloss or Matt) this automatically adds on 20p or 25p respectively onto the sheet price. (table outlined in red but doesn't yet work).
I beleive it is because the formulas are not rounding the figures to the nearest 2 decimal points. so some costs are 1 or 2 pence out. OK on a small qty not so good on a large qty.
I dont know how to do this as the roundup function only rounds up i need it to round to the neareast 2 decimal points. Also dont know how to integrate it into existing formulas and macros
I have attached a sample spreadsheet for reference.
What I am trying to do is eliminate column 'J' on the Distribution tab. I want to use column 'C' on the Totals tab to calculate the subtotal based on matching the products on the Distribution tab in column 'E' with the Products list on the Totals tab in column 'A'. Once the match is made, I need to multiply the associated price in column 'C' on the Totals tab and the associated quantity in column 'F' on the Distribution tab with the result going in column 'K' on the Distribution tab.
I tried
=VLOOKUP(E:E,Totals!$A:$A,3,TRUE)*F:F
and
=SUMPRODUCT(SUMIF(E3,Totals!A3,F3)*Totals!C3)
but neither works and I do not know what else to try.
I have a security order list. This consist of several columns most important are
Column A Column B
Sec a 15,00
Sec b 14,50
Sec c 16,00
Sec a 15,10
Sec a 15,70
Sec b 16,70
Sec a 14,80
The first column gives the name of the security, the second column gives the bid price.
What I want is that I want to sort out all bid prices for a specific security. Vlookup works fine but again it just gives the first record. How can I get all bid prices for security a on a new worksheet without blank cells. If possible I would like to have it sorted as well.
I want to be able to calculate a price based on a given quantity. But here is the trick.
Example: Widget comes in cases of 12 at $1.00 per case. If the customer orders 36 widgets, then the cost is 36 x $1.00.
If item A is ordered in quantities less than "12" than there is a 15% upcharge.
Example: Widget comes in cases of 12 at $1.00 per case. If the customer orders 4 widgets then the price is 4 x $1.15
But, if the customer orders 35. Then the first 24 are calculated at 24 x $1.00 and the remaining 11 are calculated at 11 x $1.15.
I work with a broker that have an API function and all the prices goes directly to an Excel Sheet.
What I want is a way to keep track of this prices in a new sheet, as they change. Like a historical price.
Is there any way that excel can do it for me?
I am having a problem combining two databases. I have database E and F. I need to take any price that is $0.00 from Database E and replace it with the data from database F. The catch is that there isn’t always a price to replace it with. Also, there are parts in database E that do not appear at all in database F. Below is an example (there are about 20,000 lines of data total)
In the examples above I have placed both databases together. Column four has the database designation. As you can see the 1748 Hose reducer has a price for F but none for E.
Basically I need some formula like the following:
If (part number xxx) and (part number XXX) from column 1 are the same, replace the price data from E with the price data from F but only if E = $0.00
Is this possible?
I have an excel sheet that has a list of codes and next to each code there is a price list for that particular item.
What I am trying to do it: I have another workbook that I use to type up quotes. In this workbook there are 2 columns: one with the code for the item and then another with the price thereof.
What I'd like to do is when I enter the code of the part, I'd like the price to be referenced from the other workbook and be entered into the price column.
i am trying to convert 100.50 to 100-16, agency mortgage price formats ...
View 9 Replies View RelatedI need to do a price increase on an Excel spreadsheet. I need to increase existing prices by 10% and round up to next dollar. I am not sure to to accomplish this in one step on an entire column at one time. I can copy and paste the existing prices into another column and increase them by paste special multiply by 1.1 but not sure how to also roundup the prices.
I have enclosed a copy of one of the pages in the price list so you can see what I am attempting to do. As you can see I need to increase the prices in column D. Column E and F auto increase off of D so I do not need to do anything to those columns. ... Example.xlsx
I am filling out an order form. My values are being entered as sizes. I would like to caculate any entery as 1 X the amount of the item, but the entry is for example.. "YS" and not the number 1.
View 4 Replies View RelatedI wrote code that works just fine, however, I realized there were parts of the data I was using that had 0's in it for holiday.
Bottom line, this is code that calculated the weighted average of prices for 12 months (12 rows across) and Drows across. I'm trying to use the "do while is empty" approach but can't get the syntax to work. Here's the code
Code:
For r = 1 To drows
Totwavg = 0
Tothours = 0
priceavg = 0
For n = 1 To ncontracts
[Code] .....
Is it possible with 1 formula and avoid to create 300+ individual formulas.
The background info: each day we check the prices of bananas, sometimes we check 2, 3 or 4 times in the same day, and sometimes the price that is checked is the same, but most of the time the price is diferent throughout the day.
We need to know the average dayly price for a particular day, while taking in consideration that some days we have 3 diff prices, and some others we only have 2 or even just 1 price that was checked and thats the price for that day.
we have the following spreadsheet
Column A = Dates
Dates when a price was checked, note here that there might be days of the year when in a single day the price is checked 2 or 3 times, and sometimes the price is different on the same day.
Column B = Price
The price checked on the date indicated in column A
Column C = Daily Avg Price Date
is just a date range from 08/1/11 to 07/31/12, a single day on each cell, that is intended to be the day reference for column D. C1 = 8/1/11, C2 = 8/2/11, C3= 8/3/11 and so on until 7/31/12
Column D = Daily Avg Price
In this column we need to show the average daily price calculated from the prices and dates in columns A and B.
For example: when C1 equals 8/1/11, then D1 has to equal the average price for the product, taking in consideration the amount of prices annotated for that day in column A, with the prices of Column B for that day and providing the average price.
I could have had an easy =Average formula but, since sometimes we have 3 or 2 or 4 equal or different prices in one single day in column A, I dont have a constant for the data range for excel to calculate an average.
My only current solution is to go on each cell on column D and writing the average formula selecting the range that would apply for that average price. But that is taking so much time, and i have multiple other products and year ranges and markets that require this same answer.
I have the following Macro which groups same part numbers in an excel sheet and also creating a blank row after each (or set of same) part numbers. Their prices are in the adjacent cells. I want to add the price cells and the total to appear in the blank cell below the prices.
I have one part number in Cell say A1, Its price in Cell B1
i have another same part number in A2, its price in Cell B2
(The macro has grouped them together)
Now I want to add cell B1 & B2 and the result in B3 (Row 3 is blank, created by a macro after each group of similar part numbers)
This process is to be repeted in the entire worksheet.
Sub InsertRow_At_Change()
'part number
Dim LastRow As Long
Dim X As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
For X = LastRow To 3 Step -1
If Cells(X, 1).Value Cells(X - 1, 1).Value Then
If Cells(X, 1).Value "" Then
If Cells(X - 1, 1).Value "" Then
Cells(X, 1).EntireRow.Insert Shift:=xlDown
End If
End If
End If
Next X
Application.ScreenUpdating = True
End Sub
I wanted to do a sheet for calculating prices for my work. I want to have 2 cells where in one I would type in manufacturer price and in other one I would get my price after markup. I have a list of price ranges that I don't know how to make a formula for. For example:
If price is $0-$74.99 than add $50
If price is $75-124.99 than add $75
If price is $125-174.99 than add $100
and so on til $7000