Sine Of An Angle X By Summing An Infinite Series In VBA
Jul 18, 2006
i was set some work related to maths to be carried out in VBA. the problem for me is im finding it very hard to understand either and so i cannot seem to work out how to complete the assignment given.
i can attach the assignment to save space and time reading on here however if you would like me to post up the assignement i can do that too....
Is there a way to add comment text at a 45 degree angle to an excel chat?
What I need to do is to add a comment parallel to a 45 degree line on an excel chart, and the text box dosen't give you the option t have 45 degree text.
I consider myself decent at Excel, but I don't have quite the depth of knowledge I would like. Here is my issue:
I currently have a series of 50 numbers for each row on a 300 row spreadsheet. I would like to write a formula that identifies the six largest numbers in that series and adds them together. So, for example, if the series was 8-6-4-4-4-5-1-1-0-15-3-9, the formula would spit out 47 (15+9+8+6+5+4)
The series 1,3,6,10,15,21,28,36 ("A" series) is the ongoing sum of 1+2+3+4+5+6+7+8 ("integers") and naturally goes on for as long as on chooses. I am only interested in the numbers up to 100.
Is there an Excel function that will allow me choose any integer as a starting point and any higher integer as an ending point and provide the sum of the "A" series associated with the two choices.
For example: If I begin at 6 and end on 12 it would give me 308 =28+36+45+55+66+78
I have raw data from a cyclic test that needs to be refined to generate a simple trend.
The raw data has about 1000 points to each complete cycle and im only interested in the maximum and minium values of the peaks. This would be easy but I am typically dealing with 15 cycles a second and in some instances up to 5,000,000 cycles in one test.
The amount of data is too large to be completed in one file but if done in parts I can then use a formula to reduce the number of max and min peaks chosen i.e. 1 in 100.
i have some numbers as data, i want to find the function that generate thiese numbers and also i want to view the chart of it, its kind of sine wave graph.
I need a dialogue box, which asks the user the following:
* 1) Number of Plants * 2) Number of Feeds * 3) Total Daily Hazard (4*1) * 4) Amount of Potentially Hazardous Food Daily * 5) Excretion Rate Daily (% of Remaining)
I then need a table to show:
Along the top - The Number of Feeds (2) Down the Side - The Number of Plants (1)
This is to show the amount of Potentially Hazardous material in each plant per day – and also the amount of Potentially hazardous material in ALL the plants per day on the bottom line.
Simple? – Well, my problem is that I need to create a loop which will work with the data potentially being infinite – The Number of Plants (1), The Number of Feeds (2), could be anything from 1 to Infinity.
I have a userform, on it is a very large command button with a picture of a map loaded on the button. The button is 500 width(X) by 500 height (Y), so the center of the button would be at the location 250 (X) by 250 (Y). The button is coded for mousemove to get the X,Y cooridates and when you _Click the button a textbox gives the distance to the point(mousemove) from the center of the button. All that is good, but now I'd like to find the degree of the point referenced to a compass, ie, if the point is at 250 (X) and (Y) is less than 250 then the point would be due north at 0/360 degrees and if the point (Y) is greater than 250, it would be south of the center of the button. I hope this make sense. It's been a long time since trig. I've been searching but can't seem to find the correct formula to figure this out.
Here's the other problem, I'm doing this in powerpoint so I'm not sure if cos or tan functions are loaded in this program. I am posting this in the xl forum because I figure that's where most of the people who could figure this out are. If this is in the incorrect forum I can try to move it,
I have a list of 3D landmarks, and I'm trying to calculate angles and distances between specific combinations of these points.I hit a complete wall when trying to use excel to calculate out those equations. way input these equations?
Distance equation --> distance between points A and B = sqr root of [(Ax-Bx)^2 + (Ay-By)^2 + (Az-Bz)^2]
This person (see the link) posted the excel equation, and I spent a long time trying to follow it, but can't make sense of it! [URL]
I have attached a summary of the excel I have, and exactly what I'm trying to calculate.
Summary:
1. What is the excel equation to calculate the distance between two 3D coordinates (x,y,z)?
2. What is the excel equation to calculate the angle formed by 3 3D points (again, with x,y,z coordinates)?
I'm attempting to calculate the bearing of a vector linking two sets of Easting/Northing coordinates and while I've found no shortage of equations online that should provide an answer, none seem to work in my excel sheet. The data comes from the southeastern hemisphere (i.e. Outback Australia) and my answer is needed in degrees to true north.
I have written a procedure that renames excel files within a folder based on certain words being in the title. It works for the files in the first lot of subfolders but I am trying to work out how to get it to rename all files in all subfolders regardless of the level.
I've seen similar things done using recursive subs but I have been trying to convert some of the sample codes I've found online to fit my situation and am not having much luck.
how to manipulate my code into something like a recursive procedure or anything else that will do what I want.
I have various spreadsheets that get into infinite loops sometimes when I search for things. Hitting break breaks it, and the search window (find all) shows the same exact entry hundreds of times.
I run a large simulation experiment. I have a loop plotting data in excel of a user defined area. Because of the limit of 255 series I have allowed a maximum of 250 simulations (they all need to be plotted). But the length of each simulation is free. I know there is a limit of 32.000 data points in a graph and I have this as a condition too.
If I set the data range to 100 columns and 3000 rows the graph is produced when I plot by columns. (code below)
But if I set the data range to 250 columns and 1000 rows I get the above mentioned error message. Even though I only have 250 series.
After the data is plotted it is the code below that gets the error:
Sub Macro5() ActiveSheet.ChartObjects("Chart 243").Activate ActiveSheet.ChartObjects("Chart 243").Activate ActiveChart.SeriesCollection(1).Delete ActiveChart.SeriesCollection(2).Delete End Sub
However, if there is no SereisCollection(1) actually present in the chart I get an error. How can I work around this? I will need an IF statement I assume, just not sure what it will look like.
I just recently installed Excel 2007 and I would like to know if it's possible to change all data points of a chart at the same time. In Excel 2003, I would normally hold down shift while clicking on each of the data points to make a global change. However, it appears I cannot do that in 2007.
I would like to display each data point's series name. When I go to Layout on the Excel Ribbon, and click on "Data Labels", and click on "More Data Label Options", the actual Y-axis values are shown for each data point. However, I do not want this - I actually only want the Series Name, but when I uncheck "Value" and check "Series Name" instead (under "Label Contains"), it only changes it for one of the series. Is there a better way, instead of going through each and every single series to make this change?
The following code is supposed to produce six series on an xlXYScatter chart. It produces seven with the seventh series being a repeat of the sixth but named series 7.
Sub Chart2()
Dim DataRange As Range Dim CellString As String 'Stores a cell range in the form "AA27:AB39" Dim CurrentSeries As Integer Dim SeasonCount As Integer
I have a list of data on one sheet and a 'reports' page on another sheet. The reports page has several pivot tables and a pivot chart. I want the pivot chart to format the bars on the chart relevant to the series name. The series names are "R" "A" amd "G" for Red Amber and Green respectively, I want the chart to change the colour of the series so that it is the correct colour ie. "R" would be coloured Red, "A" would be Amber and "G" would be green.
Sub PivotLoader() Dim Red As Integer Dim Amber As Integer Dim Green As Integer Red = Range("H9").Value Amber = Range("H10").Value Green = Range("H11").Value Range("B8").Select ActiveSheet.PivotTables("PivotTable4").PivotCache.Refresh Range("D25").Select ActiveWindow.SmallScroll Down:=18 Range("B49").Select...........................
I would like to have two series of data using the same X axis (date, formatted in months). The Y axis is in intervals of 100,000.
The first data series is historical (actual) data (i.e. Jan 2009 to August 2011). The second data series is forecast (Sept 2011 - August 2012). So i want the forecast series to start immediately after the historical series. It is a 'line with markers' chart. The key objective is that the forecast data looks visually distinct from the historial series.
I am trying to sum up a list of cells that have formulas attached so if there is no number in the formula it shows up as #N/A how do I make it so wherever there is an #N/A it equals 0?
The formula is designed to sum a set of data based on 22 variables between a certain date range. In order to keep the formula manageable, I have grouped the variables into arrays.
Each array (listed horizontally on one spreadsheet) calls a specific column of data to match from a different worksheet. I have no problem if only applying one array but multiple arrays return incorrect values.
I have a table that have a test or character and value (number) like A 5 B 6 C 3
And another table that has a set of characters that I want to sum the value of the characters like A B C 14 So that the result of summing the characters will be in the next cell.