How To Calculate Slope And Intercept For Variable Time Series

Mar 1, 2014

I need to calculate the INTERCEPT and SLOPE of following daily stock prices, but 60 days before the announcement days.

My data is organized like this

60 days before

25/05/07
-
20/03/09
-
23/11/03

[code]....

View 1 Replies


ADVERTISEMENT

Calculate Slope And Intercept For Variable Time Series?

Mar 1, 2014

I need to calculate the INTERCEPT and SLOPE of following daily stock prices, but 60 days before the announcement days. Its for my dissertation and Its the first time i have to work with that much data. Event study.jpgEvent.xlsx

View 6 Replies View Related

How To Calculate Series Of Row Totals

Aug 7, 2014

I have a list of stores and the costs for various items.

Each store has (usually) more than one row.

Each store's items are totaled at the end of each line. Simple

What I do not know how to do is total all rows for each store, automatically. Like I said, I don't know how to explain it, so searching for it does not work out well for me.

Please see the attached sheet : How to Calculate Store Total.xlsx

View 9 Replies View Related

Use VBA Variable In Chart Series

Oct 2, 2012

I'm attempting to create a dynamically built donut chart using VBA, but I'm having trouble inserting a variable to be used as one of the values.

The chart graphs 3 data points:
ASC GP - Located in cell T4
ACC GP - Located in cell AE4
ACT GP - variable called LocSumActGP

The code snippet I assumed would work looked like this:

Code:
.SeriesCollection(1).Values = "='Location Summary'!$T$4,'Location Summary'!$AE$4," & LocSumActGP

But it doesn't seem to like that.

View 2 Replies View Related

Calculate Next Date In Series Of Dates

Sep 24, 2009

I have a spreadsheet that lists items in column A with a start date in column B. What I need to do is in in column C list the next review date in increments of 5 days, but I only want the next day to show from the current date, not the inputted start date.

For example:

Column A Column B Column C
Item Start Date Next Review Date
Item A 12-Sept-09 27-Sep-09

Can I get a formula to calculate the increments and only show the next calendar date for the review, and then to change to the next date once the previous date has passed.

Alternatively, I have another sheet in my workbook that calculates the dates, is there some way I can display the next future date in a line of dates?

View 5 Replies View Related

Fill Series :: Declaring A Variable

Jul 28, 2009

Prior to declaring a variable i used this code and it worked:

Sheets("442000ON-1+6").Range("C7").formula = "my formula"
range(C7).select
Selection.AutoFill Destination:=Range("C7:N7"), Type:=xlFillDefault

Than i declared a variable b/c i have a number of formulas i need to use but still needed it to fill the formula in a series after the formula ran. I started getting an error.

Fix was:

Dim formula1 As String

formula1 = "=SUMIF(Pivot!$A$6:$A$108,'442000ON-1+6'!$C$3,INDEX(Pivot!$B$6:$BP$106,0,MATCH('442000ON-1+6'!$B$1,Pivot!$B$5:$BP$5)))"

Sheets("442000ON-1+6").Range("C7").formula = formula1

Range("C7").Select

Set SourceRange = Worksheets("442000ON-1+6").Range("C7")
Set fillRange = Worksheets("442000ON-1+6").Range("C7:N7")
SourceRange.AutoFill Destination:=fillRange

View 9 Replies View Related

How To Calculate Lowest 6 Numbers In A Series Of About 30 Scores

Mar 28, 2012

I am doing a Golf scorecard but I have been having trouble figuring out how to calculate the last 6 lowest scores in a series of about 30 scores. What formula to use? Series looks like this

43 52 52 51 44 44 60 54 40 50 53 = 272

View 8 Replies View Related

Line Chart With Variable Data Series

Jan 17, 2014

I am trying to produce a line chart, which will use imported data on a separate sheet (but within the same workbook)

The imported data can be of different sizes ie column widths and length. Some columns may contain only zero and should not be included in the chart, and will be to right of the data.

I have created a named range for the data series called ChartData using =OFFSET(Data!$C$1,0,0,info!$C$7,info!$A$2) - C7 and A2 are calculations to set column and row sizes. I have tried to use this as the chart's data series, but without success.

View 4 Replies View Related

Defining Variable Data Row For Chart Series

Oct 5, 2006

I want the below code to run from R1C10 (i.e. cell J1) to the end of the data in the row, which will vary in position, rather than having to define where the end of the row will be beforehand (i.e. R1C21).

Is this possible?

View 9 Replies View Related

Variable Range For Chart Series Data

May 23, 2008

I have data which is imported from a txt file and always starts at the same row (R19) but is variable in length (end of data R??). I want to be able to select the chart xvalues (R19C10:R?C10) and values (R19C4:R?C4) based on the number of cells with data in them for a given column. In addition I believe I'm having troubles with sheet references, when the txt file is opened the sheet name is set to the file name, since I want to use this macro on many different files I need the sheet referencing code to account for this. Anyway here is the section of code which seems to be giving me trouble (the initial sections just create a new column of data which needs to be referenced as the xvalues) ...

View 3 Replies View Related

Conditional Slope Of Range

Jan 17, 2008

I am trying to find the slope of column F when Column C is between 4.5-5.5. I can do this by doing four seperate lookup formulas and having the slope function referring to the results. When I try to combine the four cells into a single cell Excel gives me an error. =slope((LOOKUP(5.5,XPos,XPsi),LOOKUP(5.5,XPos,Xpos)),(LOOKUP(4.5,XPos,XPsi),LOOKUP(4.5,XPos,XPos)))

Attached is an example of the data, the functioning slope when spread over four cells, and my attempt at combining the formulas(currently with an ' at the beginning to prevent the error)

View 5 Replies View Related

2007 Macro: Run-time Error 91:Object Variable Or With Block Variable Not Set

Feb 20, 2009

I'm fairly new to macro's and VBA, by searching on the internet i've copied and pasted some code together into a macro.
But it ends in a Run-time error 91...

The macro opens a target .xls file in a selected folder, performs copy - paste actions from masterfile to targetfile.
Than it filters data in the targetfile sheet1 and copy's the results to the various other sheets; saves and closes the targetfile.
The next target file in the folder is opened and the actions are repeated in this second target file.
For the first target file this works smoothly; but for the second one (of a total of around 100) it does not copy the filter results to the other sheets in this workbook.
The error message i get is: "Run-time error 91:Object variable or with block variable not set."
When i hit debug it highlights the line "ActiveSheet.Next.Select" which, at least in the first file, seems ok.

View 9 Replies View Related

Inputbox Value Can Be Compared To A String Variable Or A Numeric Variable At The Same Time

Dec 7, 2008

I am trying to develope a "goto" page macro where the page value maybe 1,34,7A, 256C etc. I am not clear on how an inputbox value can be compared to a string variable or a numeric variable at the same time. This is what I have done, but when the texboxvalue is "7A" it doesn't work.

View 3 Replies View Related

Series Fill Based On Variable Input Data?

Mar 21, 2014

I have a spreadsheet where the start date is manually entered in Cell B1 and an end date is calculated in Cell B3. I would like to have the dates between the start and end date, with a step value of 7 days show in the rows under Cell B3. How do I get this to work?

View 3 Replies View Related

Selection Of Range For The 'slope' Function

Dec 20, 2008

Here is what I'm trying to do:

1) I have column labels, and row labels on one worksheet which I input into
a function.

2) These inputs should be matched with column and row labels, and then input
into the index function to get a certain cell - let's call it the event cell.

I'm ok with this part. Then:

3) I would like to collect a one column array. The number of cells in this
array should depend on an input from a cell in the worksheet, and the final
cell in the array should be the column label of the column where I am
inputing the formula.

4) The array from 3) should go into the slope function.

5) Then I want to get the second array for the slope function from a fixed
column, but the same rows as in the variable first array, and this should
input into the function.

View 13 Replies View Related

Add-ins Or Other Info On Calculating Y Intercept In 3D?

Feb 26, 2012

if there are any Excel Functions for finding X,Y or Z Intercepts. I can't find any online calculators returning the equation of a line in 3D.

View 2 Replies View Related

Run Time Error 91 Object Variable Or With Block Variable Not Set

Oct 7, 2009

I am having a lot of trouble finding out why I am getting error. I believe the error is because it can't find the number. In cells C115:C314 i have the numbers 1 to 200 in order. when someone types in 1 to 9 in the text box it works, but on 10 and over i get the error ???? here is the code I have

shCalculator.Range("C115:C314").Select
Selection.Find(what:=CInt(txtPackageID), After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Select
x = ActiveCell.Row
shCalculator.Range("ProposedMeter").Value = Cells(x, 7).Value
shCalculator.Range("Package").Value = Cells(x, 12).Value
shCalculator.Range("ProposedMeterAmount").Value = Cells(x, 30).Value
shCalculator.Range("Term").Value = Cells(x, 62).Value
shCalculator.Range("Discount").Value = Cells(x, 67).Value
shCalculator.Range("Equipment").Value = Cells(x, 72).Value

View 3 Replies View Related

Run Time Error 91, Object Variable Or With Block Variable Not Set

Jan 14, 2007

Function Find_Range(Find_Item As Variant, _
Search_Range As Range, _
Optional LookIn As Variant, _
Optional LookAt As Variant, _
Optional MatchCase As Boolean) As Range
Dim c As Range
If IsMissing(LookIn) Then LookIn = xlValues 'xlFormulas
If IsMissing(LookAt) Then LookAt = xlPart 'xlWhole
If IsMissing(MatchCase) Then MatchCase = False
With Search_Range
Set c = .Find( _
What:=Find_Item, _
LookIn:=LookIn, _
LookAt:=LookAt, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=MatchCase, _ ........................

Using the message box I see that sheet 1 opens but then I receive an error message Run Time Error 91, Object Variable or With Block Variable not set. I tried declaring and using set on "project" but got nowhere. I also need to have a message indicating project not found. Once this part is solved I will loop all of my other workbooks

View 5 Replies View Related

Intercept Formula - Reference In 1 Row Not 2 Columns

Dec 2, 2011

When you use a formula like intercept. It wants its ranges in 2 columns. for example, intercept(A1:A5,B1:B5).

How can I get intercept to work using the ranges in 1 row. for example, intercept(A1:D1,E1:H1).

I want to do many intercepts in a large data range and still filter by some other variables that go along with these intercepts.

View 2 Replies View Related

Time Series Function

Mar 26, 2008

I'm trying to calculate and average using a time frame in the day. I want to use a certain number "X" that correlates to a hour/minute in the current time. How do I write a statement to get me the correct "X" value?

example:


8:00 .005
8:01 .006
8:02 .0075
8:03 .0077
8:04 .008

time now is 8:03

How do I get the .0077 in excel?

View 10 Replies View Related

Compare Time Series

Aug 21, 2007

I've got two time series (growth rates: what was the forecast for any particular year and what was actual growth rate for that year). I need to compare them to flag those most different. Actually I want to check the accuracy of the forecast. What would be the best function to do it?

View 5 Replies View Related

Divergence Between Two Time Series

Jun 1, 2008

I attached the excel file with two time series data next to each other – the price and an indicator data. I have to automatically identify when the two time series DIVERGE from each other. Diverging occurs when the price makes a new high and the indicators doesn’t make a new high (called “bearish divergence”) and also when the price makes a new low and the indicator doesn’t make a new low (called “bullish divergence”). I attached the two pictures I made to demonstrate these two divergencies.

To spot the divergencies one would go through the price data – finding new highs and lows and then compare each consecutive high and low with the corresponding reading on the indicator field to see if it is also making new high or low. There would be a minimum and the maximum of data points to look back – that would ideally be configurable from a separate input cell. The problem is that I do not know how in principle such task should be approached - is it best to make a macro or can this be done through a series of formulas each building upon the previous?

View 6 Replies View Related

Excel 2007 :: Calculate Time By Time Periods Splitting Productivity?

Mar 8, 2014

production01.png

I am trying to figure a way to search for a cell that has a specific date and time range. There are several cell titles pending on the activity. I want to find a cell that has a time ** 7:30-15:30 , 15:31-17:30, 17:31-20:30. The end result is to calculate the activity between those time periods based on the data cells.

Example

If the date searched time field ** the activity ranges is 1635 I need to split the time and credit the activity time in the 730-1530 time and the rest on the 15:31-17:30 time

I have been able to do it on a single labor group based on time alone, but when I try to add the DATE to it my numbers go null. Eventually i will need to add 11 labor groups daily for weeks at a time .

Excel 2007

View 3 Replies View Related

Formula To Calculate Time Allotted Minus Time Used And Show Difference In Hour And Minutes?

Apr 27, 2014

Formula to calculate time allotted minus time used and show the difference in hour and minute.

View 1 Replies View Related

Find Intercept For Nonlinear Data Sets

Nov 15, 2006

I have time (T) as a common variable located in cells A1:A9000. I also have two large data sets in columns B and C (cells B1:B9000 and C1:C9000). If I put them into an X,Y Scatter chart it is easy to see that at some point in time (perhaps around cell A3000) the slope in data set B will begin to rise and eventually the two curves will cross. I would like to find the intercept point and/or an estimate of that point (if it does not exist in the data set) and have the corresponding time reported in a set cell.

View 4 Replies View Related

Find Latitude And Longitude Within Radius And Within Given Slope And Return Number?

Feb 25, 2014

I have more than 1000000 coordinates with heights to sort through. The aim is to be able to give a specific radius and check all coordinates within this radius if the slope is more than a maximum slope. If this is the case it need to put the value (in this case) 100 in a new column. The reason for this is we have a reasonable flat terrain but the entire area is filled with Anthills. I need to sort the data. Normal ground points (No Anthills) should be labelled/coded as 200 and anthills as 100. This will allow my program to know the difference between the ground and anthills. In the tab "Input Sheet" I have a small portion of co-ordinates starting from row 8 to row 53 (this will have to extend all the way down to the last row in excel). I need to copy each row starting with row 8 (C8:E8) and paste it in row 2 (C2:E2). Column H indicates if the points are forming an anthill and the code needs to change. I have my final answer in the tab "Final Answer" that I require for my program. Is there any way I can write a VBA code that will check all the point instead of doing it manually.

View 4 Replies View Related

Pivot Time Series With Two Different Categories

Dec 29, 2013

I have a series of up to 40 or so entries for given dates. These entries are categorised by either "bid" or "offer" and I'm trying to find a way to chart them both using a pivot table. I'm stuck as it seems that a pivot can only count the number of bids and offers on any given day, but it cannot differentiate between them.

Note: that the original list the pivot depends on will constantly be updated so I can't just develop a custom chart.

I've attached a spreadsheet with an example of what I'm playing with. Pivot graph is in "PIVOT" worksheet, data is in "DATA".

pivotland.xlsx

View 6 Replies View Related

2 Series Chart For Different Time Periods

Oct 24, 2007

I am trying to plot two data series in one chart. The first series has monthly corn prices for last 10 years (~130 data points). The second series has bimonthly chicken prices over the last 10 years ( ~72 points). How can I plot them together?
The bi-monthly periods for the second series do not exactly coincide with calender months ( e.g. Aug 19 to Oct 13, 2007). As a result, I can not adjust the points to match with calender months.

View 2 Replies View Related

Discontinuous Time Series Charts

Apr 21, 2008

I just joined ozgrid and this is my very first post. I have read the rules but spare me if I make some errors.

My question is related to plotting time series charts using VBA. I have data in the following format.

04/21/08 9:04:47 4.5055
04/21/08 9:04:48 4.5055
04/21/08 9:04:49 4.5055
04/21/08 9:04:49 4.5055
04/21/08 9:04:50 4.5055

04/21/08 10:05:00 3.5055
04/21/08 10:05:32 3.5055
04/21/08 10:05:40 3.5055
04/21/08 10:05:48 3.5055
04/21/08 10:05:51 3.5055

04/21/08 11:07:59 5.5055
04/21/08 11:09:00 5.5055
04/21/08 11:10:01 5.5055
04/21/08 11:11:02 5.5055
04/21/08 11:13:08 5.5055
04/21/08 11:14:11 5.5055
04/21/08 11:15:16 5.5055

The column on the left is NOW() output and the one on the right is data corresponding to the given date and time. You may interpret the above data as snapshots taken at regular time intervals.

Now what I want to do is make a chart with the above data. Where ever there is a break in the snapshots, represented by a blank line, I want the graph to jump to the next data point much as the way stock prices move from the closing price to the opening price on the next day. I am not able to figure how to do that. Since I want the x-axis to represent time, using scatter charts does not work since the intervals are not proportional to the time then.

View 9 Replies View Related

Intercept & Cancel Keystroke Events When CommandButton Is Active

Jan 11, 2010

I'm building an Excel worksheet into a kind of dashboard with CommandButtons and TextBoxes to drive the functionality of the rest of the document.

I'm trying to recreate some of the functionality of a UserForm (e.g., tab order). I'm using the CommandButton's KeyDown event to respond if the user presses Enter:

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved