I'm trying to format the plot area of a X-Y scatter chart in a three colour gradient (Green, Yellow & Red).
The trick is, I would like the green portion to be centred in a user defined place on the plot with the yellow radiating from it, and the red radiating from the yellow. Ideally I would like to define some stops for the green as a user defined shape, with stops for the yellow outside the green stops (like the % stops you get in a vertical or angled gradient, but instead of the stops being simple straight lines or concentric circles from the middle, they would be user defined shapes).
I can do the normal types of gradient, but have no idea how to customise them in this way.
I have plenty of experience with VBA outside of charts so that's where I need assistance. I need to get SeriesCollection(4), the PTAI series, to appear on the area chart second from the bottom instead of on the top.
The order for the non-line series should be, from top to bottom: SeriesCollection(3) - Non-Mission AC ( Training, T&E, AMarc series) SeriesCollection(2) - Total Pipeline series SeriesCollection(4) - PTAI series SeriesCollection(1) - Available PMAI series
Here's the
Sub MakeSandChart()
Dim ChartSource As Range Dim ChartName As String Dim ChartSheet As String Dim yCount As Integer Dim PAA_Value As Integer
Application. ScreenUpdating = False
passtype = Mid(ActiveSheet.Name, 5, 1) Set ws = Worksheets(ActiveSheet.Name)
I have charts that needs to be placed on specific position and have specific sizes on a chartsheet. I use chartobjects(i).plotarea (top, left, width, height) for that.
Unfortunately when I set these values they still change and get antoher value, there is some scaling going on in Excel and I do not know where that comes from. I have been looking on the internet and finally I found a piece of code which works, but still not good enough, because the legend is also not good positioned.
De data for resizing the charts (ChtNew), the legends and the charttitle I get from other charts (ChtOrig). The legend.legendposition of ChtOrig does not have a value but it still have a top,left,height en width which I use.
I show you my code, the part with the for-next is taken from the internet.
With ChtNew.legend .Top = ChtOrig.Legend.Top .Height = ChtOrig.Legend.Height .Left = ChtOrig.Legend.Left .Width = ChtOrig.Legend.Width '* 1.1 .Top = ChtOrig.Legend.Top + ChtOrig.ChartTitle.Top End With
how to resize the plotarea of a chart so that it wont overlap with the title. I can't seem to find the appropriate property to let me determine the height or the bottom edge of the chart title.
I'm using Office/Excel 2004 on a Mac Mini duo running OS10.6.8. I upgraded to Office/Excel 2011 but I find the program so horrible I had to switch back to 2004.
The problem: On one chart, the Y-axis label values have moved from outside the left-hand axis to _inside_ the right-hand axis and within the plot area. I can't figure out how to move the labels back to the right position.
This seems so simple but i looked everywhere and i cannot find the vba script to add a 3 point solid black line border around the chart and plot area of my graphs. The record macro option does not record this.
We have a lot of charts we want to create in Excel 2007. We have templates created that seem to work. (But also sometime seem to not.)
After the charts are created that are placed in their own chart pages/sheets. The problem I'm having is that the x axis title doesn't seem to be centered horizontally wrt the x axis of the plot area. (It does look centered wrt the chart area.)
Some code or an algorithm to control he placement of the x axis title and maybe center it?
I am trying to graph the following data in an area chart with line charts superimposed on the area chart. I have a lot of data (and a lot going on) so I'm trying to figure out the best way to show this in excel from a functional standpoing (i can't get this to work in excel!!) to also an asthetic standpoint (dont want it to look terrible or illegible). This is what I'm trying to chart:
1) Weather data (temperature) by region: So one region, would be: Northwest I would like the "area" (so a shaded region) to be the min/max of the temperature data for each month.
2) I would like to show the temperature for each year as a line graph on the chart - so you can see if a year falls in or out of the shaded region.
3) I would like to show a company's sales increases across the same months per year as separate line charts. I may choose to just show the biggest outlier year in the end... or to show 2006 (the latest data).
What I am trying to convery with the chart is that the company's sales is or is not tied to weather deviations. I have attached an excel file with the data. I haven't been able to use the area chart or get a two axis chart to work or get it to look even remotely professional.
Each time I press F9, the Account value changes because the win/loss is generated randomly. Assuming, I press F9 100 times, how do I create a scatter plot chart with a best line fit for all the account values. I know how to create the scatter plot but how do I save all the values everytime I press F9.
I have a data series plotted as columns. Then I want a horizontal line at $5,000 to appear all the way across the chart. It appears from the 1st to the last data point, but there is blank space before the first point and after the last point. I would like the red line to extend into this blank space before and after, so that it is going across the entire chart.
I tried playing around with different axis settings and no luck.
Currently we have data that is plotted to a scatter plot along with an already defined line. Next, with a straight edge we attempt to draw a line parallel to the already defined line through the scatter points of data. We basically find two points that give us the best fit to the original line. What I attempted to do was calcualte the slope of the original line and then the slope of each combination of two points in the data set. I then subtracted the slopes, found the minimum difference and thought that would give me the line most parallel to the original. This doesn't seem to work. I'm at a loss, any advice?
I have made two line charts from a selection of data and added "shapes" to fill certain areas under the lines. Is there a way of doing this within the chart rather than adding a shape over the top?
I have two line graphs I plot on a 12-month graph. In addition to these lines, I have a range, high, mid, low, for target percentages. Currently, I have plotted the high, mid, low lines and made them dashed. What I would like to do instead of just having these ranges shown as lines (w/ the graph background showing), is use the area graph function to color shade just the area between the high, mid, and low. Is this possible?
I am using the following macro to set print area which I found on the net. I am trying to modify it as I would also like to place a border line on the bottom row but cant find anything to assist me despite searching through several threads.
Dim myrange As String With ActiveSheet.Range("A:A") myrange = .Find(What:="*", After:=.Range("A1"), LookIn:=xlValues, LookAt:=xlPart, _ SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Address End With ActiveSheet.PageSetup.PrintArea = "$K$1:" & myrange End Sub
I am looking for a formula that will tell me how many days in each month for which a given time span is active. For example the time span 1/1/2014-2/28/14. I want to know the time span is active for 31 days in January and 28 days in February. Another example: time span of 1/15/2014-2/28/2014. I want to know that the time span would be active for 16 days in January and 28 days in February. I am looking for a formula that will capture the amount of days in each month for which the time span covers. as I only know how to write a formula with multiple if statements that require a different formula for each given month, rather than one formula that applies to all months.
I have a list of people with 10 years of salary history for each (in ten consecutive columns on the spreadsheet).
I need to calculate the HIGHEST 3 consecutive year average salary for each (if they have less than 3 years with salary, then it should just average the years the do have, be it 1 or 2 years).
Here is the kicker: some people have breaks in service (for these years, there is a blank in that entry). These years should be ignored and skipped in calculating the avergaes.
So if someone had salary figures in years 1, 2, and 4, but a blank in year three, the average of years 1, 2, and 4 would constitute one three year average (whether or not it is the highest is a whole other matter...).
I have been round-and-round the best way of doing this. I was thinking of maybe creating a UDF that calculates a three average, then do it up to 8 times (one for each starting year) in 8 "helper columns", and taking the highest average.
I would like to calculate the weighed average rate( rate*qty/ total qty durig a period) for different periods say 2.00 pm to 2.01 pm, 2.01pm to 2.02 pm etc. Is there a way to do this by using database(dsum,daverage) functions. What will be the content of the criterion range? Or is there any other way of solving this.
I am developing a report that tracks the efficiency of industrial sorters on an automated assembly line. The line runs around the clock in three shifts (1: 7:30am to 3:29pm, 2: 3:30pm to 11:29pm, and 3: 11:30pm to 7:29am), and collects certain performance indicators, such as units processed. I am trying to calculate the units processed during each shift on each day. For example, if a run ran from 2:30 pm to 4:30 pm, and processed 100 units, I would want 50 units credited to shift 2 and 50 units to shift 3 (we are assuming a steady rate of processing).
My data arrives from the machine with the following columns (each run is a separate row):
B|D|E|G|H Run #| Start Date| Start Time| Units Processed | End date | End Time
I have successfully used the start time to determine the starting shift with IF statements:
=IF(--E3<0.3125,3,(IF(--E3<0.6458,1,(IF(--E3<0.9792,2,3))))) and a similar formula to calculate the end shift. This works fine if the run only spans two shifts within the same day.
My problem is that some of the runs, run across more than one shift and even across days. For example, a run that ran from 10:30 pm on one day to 4:30 pm on the next, would overlap 5 shifts and two days. I need to be able to figure out the proportion of time spent on each shift, and use that to get the proportion of units processed during each shift on each day.
I am currently thinking of a convoluted series of nested IF statements (and generating lots of columns to the right of my data for each potential shift within a run), but this seems inelegant and cumbersome. Is there a more logical way to approach this? Even more specifically, is there a function that can pair my start/end dates and times with a set of shift start/end times and calculate the elapsed time for each shift within a run? Something with MATCH or VLOOKUP maybe?
I've got daily water level data that spans around one hundred years. I am looking for monthly average water level data, but rather than using the whole month, I'd like to average the first two days and the last two days. I want to have a single value for each month in the 100 years of data.
If the data was smaller I could do this by hand, however having 100 years worth of data = 1200 months = so many days...
It's tough since months don't have a set number of days, and then leap years and it all gets so complicated. I've never really had a problem where date was a criteria to pull values from, and I don't know how to work with this. The internet suggest the Averageif function which I have dabbled with, but no dice.
How can I print 2 selected area (highlighted area). I know there is a trick to do that. Right now I can only select (highlight) one area to print, but would like to know how to print 2 or more areas at same time
Using Excel 2003 I am trying to write a macro to set the print area according to the amount of data in a particular range of cells. I find I can include this instruction
Column B is start date and time whereas Column C is end date and time. My aim is to cut and paste the whole row automatically to Sheet2 if the time is within 2AM to 8AM else leave as it is.Also I don't know anything about VBA Script.
I have the data to import / read in a pdf, in a doc, or in an Excel worksheet whichever is easier to use. I need to import the data, parse it into the correct cells for that row and then repeat the import until the end of the file. Not all the cells are in each group of data to import, so those cells will be null for that row. Some of the data for one cell may be in up to 14 lines in the data file. I have be concatenating these data rows into one cell. There are 48,000 lines in the file to import or I would do this manually. I am assuming that doing this in VBA would be the most efficient method.
Our small family business has a mailing campaign that we track with excel. However, we're very concerned about users opening the macro-filled master spreadsheet. Instead, we'd like a macro to do everything for them.
When a letter comes back in the mail with a bad address, the user types the Street number and street name such as "1234 Main St" into $A2 of c:dropbox eturned.xlsm, presses the macro button, and it should do the following:
Opens and Searches "Sheet1", "column S", in the file c:dropboxmaster1.xlsm, and finds the LAST instance of the address typed.Selects that entire rowCopies the entire row.Pastes the contents into the row of the active cell in the destination spreadsheet, overwriting what was there before. Such as $2:$2 if the address was typed in $A2.In the master1.xlsm spreadsheet, sets the entire copied row color to "gray".closes master1.xlsm and saves changes.
The end result is that the user now has an identical row of information in their spreadsheet, and the master spreadsheet's row is colored gray indicating it has been completed.
Other notes:I'm open to more efficient steps than this if you have them.There are approx 5,000 records to search through in master1.xlsx at any given time.
I have about 180 workbooks which I need to compile into a Master Schedule.
All the tab 1's are different, these feed into tab 2, which the data has the same formatting throughout. The 2nd tab has the same data for A:F 1 but cells A:2 - F:2 down to row 9 are populated from tab 1, therefore different in each. I am trying to get a Master schedule that lifts the data in the fed cells into a line by line spreadsheet?
Is there a way I can get excel to look at a folder, then every workbook in it, the at the 2nd tab in every workbook, then list the cells as described above? I am not after a consolidation of this data, but a full list?