X & Y Scale Chart Max,min,tick Linked To Cell Values

Dec 10, 2008

I am using Jon Peltier's worksheet_change event code to try and automate chart axes.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$AG$5"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlCategory) _
.MaximumScale = Target.Value
Case "$B$3"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlCategory) _
.MinimumScale = Target.Value
Case "$AG$7"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlCategory) _
.MajorUnit = Target.Value
Case "$L$3"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlValue) _
.MaximumScale = Target.Value
Case "$N$3"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlValue) _
.MinimumScale = Target.Value
Case "$AH$7"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlValue) _
.MajorUnit = Target.Value
Case Else
End Select
End Sub

However, I have some of the cells setup as formulas....but worksheet_change apparently only updates values when manually changed.

View 9 Replies


ADVERTISEMENT

Restrict Tick Cell Upon Selection To 1 Tick Per Row

Jan 10, 2007

I was reading your Tick Cell Upon Selection article and it works great. I'm just wondering if there is a way to modify it so that they can only select one of the cells in a row.

For example, in this spreadsheet, the cells I have marked for "tick upon selection" are N8-Q8. In this worksheet, though, I only want the user to be able to select one of the four options. Is there a way to format the code so that they either cannot select another cell until they have deselected the first one, or the first one unchecks itself and the new click ticks that cell?

Example: Person selects N8. Person then selects P8. Can it not allow P8 to be selected (and give a warning message) or can it uncheck N8 when P8 is checked?

View 6 Replies View Related

Chart Data From A Changing Linked Cell Over Time

Nov 7, 2008

I am trying to chart data from a single cell that is changing over time. The cell is linked to another software program that provides its value. I would like to be able to chart the changes in its value either every time it changes or on some time interval (i.e. every 3 minutes).

View 9 Replies View Related

Chart Legend Text, Linked To Cell, Not Displaying

Jun 18, 2008

Has anyone ever seen a problem like this? The Legend text is not displaying what is in the cell reference and I cannot figure out why.

View 9 Replies View Related

Can't Get Tick Boxes To Effect Pie Chart

Apr 28, 2014

I have set up a spread sheet which uses tick boxes and I have calculated it all up so that the percentage of ticks ticked is displayed in a cell etc. and when I link that data to a bar chart it works perfectly. .e.g as I tick the boxes the bar chart increases

BUT when I try to do the exact same thing with a pie chart it doesn't work.

View 14 Replies View Related

Position Of Tick In Column Chart?

Jan 9, 2014

I have 6 column charts that are supposed to be identical. There are 12 pair of columns per chart. Some chart's pair are centered over the tick and some pair are to the right of the tick and I can't figure out how to make them all the same.

View 1 Replies View Related

Plot/Chart Tick/Check Marks

Apr 21, 2008

Is there any way in which I can map the tick mark labels on either the x-axis or the y-axis to different values other than the ones that are being plotted for.

For example, lets say the data is:

1 5
2 6
3 10
4 15
5 8

I want to plot these in a chart but instead of displaying 1,2,3,4,5 on the x-axis, I want to display a different column, say,

5
7
9
11
13

The answer is not as simple as plotting the required x-values with the y-values. I have just used a simplistic example but the thing I am trying to do has dependencies involved so I cannot simply plot the chart with the required column.

View 5 Replies View Related

Position Chart/Graph Tick Mark Labels

May 21, 2008

how to put the categories (Column H) out of the graph? (so more to the left, so not in the grey background) Here in the attachment you will see that the titles are in the graph instead of outside the grey background. Is it possible to do that?

View 2 Replies View Related

Update Chart X Scale With VBA

Feb 16, 2012

I am using a VBA macro which performs a Yahoo webquery to obtain stock data. After the data are downloaded, a chart is updated with the new data.

The current macro updates the scaling on the price axis just fine, however, if I change the time frame the x axis, i.e, time/date axis is either spread out to far or jammed up.

The code for re-scaling the the y axis is shown below:

Code:
Sub UpdateScale()
Dim ChartVar As Chart
Dim lMax As Long, lMin As Long
On Error GoTo ScalingProblem
'Assigns the values in the Min and Max ranges to variables.

[Code]....

Any similar sub that would also rescale the x axis as needed when the data intervals are changed?

View 6 Replies View Related

Scale Chart Series To MIN & MAX

Sep 26, 2007

I have a Scatter chart that plots a simple XYScatter plot. The data for this plot can be very wide ranging, and for that reason, I use AutoScaling to scale the axes. Nine times out of ten, it works just fine, but it seems that when the X data ranges from about 5200 to 7200 +/-, the autoscaling does not calculate well (example attached).

Autoscale range will go from 0 to 8000, leaving a large area of unplotted graph space.

I thought the original issue was that I may be plotting zeros or blanks, but I've eliminated that problem. I have yet to find another range of values that causes it, but I'm sure there's some. What is it about the way that Excel calculates its AutoScaling that I'm missing?

What do you all recommend to eliminate this problem? Manually scaling it is not really an option in this case, as I want this to be completely transparent to the user for ANY range of data.

View 9 Replies View Related

Determine Minimum Scale Value Of Chart Axis

Dec 14, 2007

how to get the min value scale value off a graph when .MinimumScaleIsAuto = True?
The reason I ask is that I want to make my baseline for the graph that min number so that names from the x axis are not sitting in the middle of the graph. Incognito Auto Merged Post;I feel real bright...just playing around I found my answer...

With .Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlCustom
.CrossesAt = .MinimumScale
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With

View 2 Replies View Related

Set Chart/Graph Minimum/Maximum Scale To Nth Smallest & Largest Value

May 15, 2008

I am trying to manually format a few graphs in my sheet. I, however, leave the major units of the axes to be automatically calculated. The code that I use is given below:

ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = Range("Min").Value
.MaximumScale = Range("Max").Value
End With

Now what this does is that it sets the maximum of the scale exactly equal to maximum of the range being plotted and hence a few parts of my graph overlap with the border of the plot area. Is there any way in which I can round the max and min scale of y-axis to the next highest and lowest major unit respectively or may be add and subtract a value proportional to the major unit of the y-axis. I cannot add a constant in the code given above since I that does not suite my requirements.

View 2 Replies View Related

2 Cell Values To Be Linked Together

Mar 27, 2013

I have the following details

A B

1 Jim 3rd
2 Jack 5th

Now in the new cell i need A1 + B1 with / in between

Like Jim/3rd
Jack/5th

View 6 Replies View Related

ActiveX Listbox Does Not Work With VBA Code For Changing Chart Axis Scale?

Jun 5, 2014

I have some code for changing the scale of my chart axes so that when new data is inserted into the column which the chart sources from (say column B), the axis scales on my chart will automatically adjust (as the Excel algorithm sometimes leads to charts which are a bit squashed). This code works fine, and I have included it below.

I have then tried to introduce an ActiveX listbox so that when you select an item in the box, the reference number generated (1,2,3...etc) then determines which data series is inserted into column B using a vlookup function. However, when I do this, the original VBA code for automatically adjusting the chart axes no longer works.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet.ChartObjects(1).Chart

[Code].....

View 4 Replies View Related

Fixing Chart Axis Scale To Thousands And Displaying Multiplication Display Label On Remaining Number

May 16, 2013

I want to automate the Display labels in my Charts using VBA Coding…

I would need to use this small code in Charts with different Scales as some of the Scales in my Data are in a very large Range close to Trillions so its not possible to have these as the Primary-Y-Axis Scale and therefore I would need to use the in-built Display label option which Excel provides..

However, I always prefer to have the scale in the Range of Thousands so the Max I can have in the Scale can be 10,000 so if there is any Number more than that or the Scale is going above than I would prefer that this gets auto-calculated to Multiply with the remainder and show appropriate Scaling.

For Ex:In this example My largest Number is 4500000000 which is 100 M..So I would want the scale to show 4500 and the Display label as X Millions..

So The Display Label would be different for different Ranges but the Max Scale preffered would be 10,000.

View 8 Replies View Related

Rank Values Into Top/Bottom X Scale

May 21, 2008

I am creating a Power Poll Spreadsheet for a Fantasy Football League, and I need to create a code that will take the win/loss columns and in a new column assign rankings so that the team with the most wins gets ranked '1st', then '2nd' etc. I'd like it to, in the case of a tie, rank both teams equally 'the 3rd and 4th best teams both have identical records, so both get ranked '3rd' and the '4th' ranking gets skipped.

I have searched for a formula to allow this, and I can't find it. Can anyone help? As an aside, is anyone aware of a place I can find a listing of formulas that can be used in sports ranking, etc?

View 8 Replies View Related

Building Legend Of Chart Titles Linked To Charts

May 14, 2014

I have a sheet with about 50-60 charts and I am hoping to have a master list of chart titles on the side, how can I link these titles with the charts themselves?

View 1 Replies View Related

Convert Time On Scale Of 100 To Scale Of 60?

Feb 1, 2013

How can we convert time on a scale of 100 to a scale of 60?

View 3 Replies View Related

Turn Off Error Alert When Using Zero Values In A Logarithmic Scale

May 26, 2006

I'm creating several dozen charts all using Logarithmic Scale and while I know you aren't supposed to provide Zero values in the source data this is one project where that can't be helped. My problem is that the Excel Alert keeps popping up to tell me I shouldn't use zeros and it keeps crashing my sheet because it pops up every 10 seconds or so.

My question is: Is there any way to turn off an Excel Error Alert? OR Is there any value I can place in those cells (other than Zero or One) that would stop that troublesome alert from popping up? Just for reference, this is the alert: MICROSOFT EXCEL

Negative or zero values cannot be plotted correctly on log charts. Only positive values can be interpreted on a logarithmic scale. To correct the problem, do one of the following: * Enter only positive values (greater than zero) int he cells used to create the chart. * In the chart, click the axis you want to change. On the Format menu, click Selected Axis. Click the Scale tab, and then clear the Logarithmic Scale check box.

View 8 Replies View Related

Print Linked Chart & Each Page Field Of Pivot Table

Oct 31, 2008

I have linked a graph to update from a pivot table. I would like to print a copy of a graph and pivot table for each item in the page field.
Can a macro loop through each page field and print?Is there a way to send them to the printer all at once? (I noticed the printer hangs when manually printing page by page)

I've tried "view all pages of pivottable" but then I lose the view of the chart. I tried recording the events but the number of items in the page field changes with each data update and I'm not sure how to write code to accept this.

View 8 Replies View Related

Tick Cell When Selected

Sep 28, 2007

I would like to achieve the affect where if you click on the cell its contents will change. For example, if you click on it once, a checkmark will appear, but if you click on it twice and x and if you click on it a third time a - will be displayed.
I was thinking along the lines of a marco for the spreadsheet, which would run an if loop to check what was currently in the cell then change accordingly. Is there a command that would allow me to do this, or would is there an even easier way? side note how would I even display a checkmark of square root sign, through vba? This is what I have, It was working but now it does nothing and I cant remember what I tinkered with.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 6 Then
If Cells(Target.Row, 6) = "" Or Cells(Target.Row, 6) = "-" Then
Cells(Target.Row, 6).Formula = ""
Application.EnableEvents = True
ElseIf Cells(Target.Row, 6) = "?" Then
Cells(Target.Row, 6).Formula = "x"
Application.EnableEvents = True
Else
Cells(Target.Row, 6).Formula = "-"
Application.EnableEvents = True
End If

End If
Application.EnableEvents = True
End Sub

View 2 Replies View Related

Using Cell As Checkbox (add Tick Mark)

Nov 13, 2008

I need to click on a cell and when I click on it, it should change colour and insert a tick (or other symbol).

View 14 Replies View Related

Automatically Tick Cell If Entered Value Matches

Aug 23, 2007

I have attached a spreadsheet which, when you enter a matching value in the vehicle column, the cell that matches the vehicle name in both instances (column and row) is ticked. Think I am wanting to use a worksheet_calculate function but cannot figure out how to write the appropriate lookup in VBA. I do not want a formula in the cell.

View 9 Replies View Related

Show Tick Or Cross Upon Checking Cell

Jun 2, 2008

i don`t know how to make this in VBA

But please allow me to explain, if I have numbers in Cell F9 I want image to be displayed as (X <---- which it means wrong) on G9 and message to be appear in H9 says only words are allowed. In case, cell value are words; I want it to show image <---- which it means right) and the message to be say correct. And if cell is empty I want it to show image (!) and the cell beside it the message should say (Please Fill up).

I want to apply this to words instead of numbers as well.

View 4 Replies View Related

Tick Cell Upon Selection. Restrict To Non Contiguous Ranges

Apr 2, 2008

I am trying to use excel to score a test. I want to tick a cell to do so. There is an excellente information about Tick Cell Upon Selection, posted here http://www.ozgrid.com/VBA/excel-checkbox-tick-cell.htm. Its range is limited to (A1:A100)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
Target.Font.Name = "Marlett"
If Target = vbNullString Then
Target = "a"
Else
Target = vbNullString
End If
End If
End Sub

How can I increase the range so it would target C1:C30, E1:E30 ( total of 17 columns)?.

View 3 Replies View Related

Tick Boxes When Ticked Calculate Accumulative Percentage In A Cell

Apr 22, 2014

I have a spread sheet with various tick boxes, that when ticked calculate an accumulative percentage in a cell. This cell is the basis of my graph.

E.g. if the cell displays 80% - the chart with show 80% - simple.

However, I want to write a vba code that changes the fill colour of the chart depending on the percentage.

i.e. if the percentage data = 0-49% I wish the chart to display as red. 50-69% - yellow and 70%+ = green.

View 2 Replies View Related

Chart Last X Cell Values

Aug 19, 2008

I am trying to create a chart that will chart the last five values of a series of data. As this series of data is being updated daily I would like the chart data range to point to the last 5 entries on a week by week basis. I'm sure it can be done but I am unsure how.

View 4 Replies View Related

Filtering Linked Values

Jan 13, 2010

either writing a formula or coming up with some way to filter out certain values and it's stumping me... it's probably way more simple than I'm making it I've got an attendance spreadsheet with employee names going down the first column and dates going across the top row, managers use codes to indicate sick, personal time, etc.

There is a separate spreadsheet for supervisors to track vacation (don't ask me why) and I was asked to link the data from that spreadsheet into the attendance one described.

Linking is no problem, since it's the beginning of the year I'll just do a copy & Paste special.... paste link and they can still use that 2nd vacation spreadsheet to update both places for vacation time. However.... the vacation sheet has some extra info they don't need/want to see on the attendance one (ie. Lv @ 12:30, Holiday, etc.) How can I filter that out so that the only thing that appears is the V for Vacation that is linked & other attendance codes that are entered (S for Sick, etc).

I'm using Excel 2007

View 14 Replies View Related

Getting Unique Values Which Are Linked To Dates

Nov 30, 2009

I have one columA with around 30000 item numbers and column b with dates .

Colum A has duplicate items which has different dates associated with them.

i want to remove duplicates in column A but the problem is i want the unique values with the most recent date.

View 9 Replies View Related

Extract Numerical Pixel Gray Values From Gray Scale BMP Image

Oct 21, 2013

I have a *.bmp image file. It is gray scale only. It amy be up to 1000 x 1000 pixels.

I want to extract the numerical value of each pixel and deposit the values into an Array for further processing.

View 1 Replies View Related







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