I m working with bar charts and as I've heard these labels can be a bit of a pain. I've got the labels in roughly the right position 90% of the time however that other 10% has me in rolling fits.
1. A label within the chart area is wrapped on two lines, how could I restrict Excel from wrappign the label
2. A Labels position covers some of the data reported and thus makes the graph messy
how could I find the position of the end of the bar and also the length of the datalabel so I could reposition it. Note I am using 2003 and that I am trying to use
How do I write a short piece of code that defines the specific height and width that I want to assign to an existing chart. The code will be added to existing code that I have that formats the chart in other ways. This needs to be able to work with any active chart selected, not a specific named chart.
I'm creating a map like image with Excel, and I've set the column width and row height to certain dimensions. Now I'm entering in some text into them, and I noticed that when I added in 2 digit numbers, the column width expanded a little bit. I want to prevent this from happening, and still be able to enter in the 2 digit text (since it WILL fit, and it's expanding to keep that extra bit of space).
The problem with it is, the Height and Width is arbitrary to the size of the cells at the moment. I would like to had a procedure to calculate does value. They represent the distance between the defined cells location for the image. Actually, if cells width or height change, the picture is misplaced.
I'm using a UserForm.Label to display comments which are of variable length. At the bottom of the UserForm are two CommandButtons. I'd like the gap between the Label text and the CommandButtons to be small (and preferably constant); and the CommandButtons to be at the bottom of the UserForm. This means setting the CommandButton.Top and UserForm.Height as a function of the Label.Height. The crude way I have so far achieved is to use Len(Label.Caption) as the surrogate for Label.Height but it's not very satisfactory due to word-wrap and blank lines.
I have a userform which has vertical and horizontal scroll bars. I want to set the scroll bar width and height properties to the correct value, regardless of the size of monitor screen used to look at the user form. I'm thought of using the code below in the initiliaze event for the user form:
However, this does not seem to work. I've tried adding 250 (Me.Height + 250)to each measurement, which works, but gives the user with the larger screen a very big scroll area. I wondered if there was a formula based on the application height, that would allow the scroll height to be perfect for the user form regardless of screen size?
PS. I also use the following code to set the user form height on initialize. I don't know if that effects anything.
This used to (and on some machines still does) work very well, but all of the sudden on my work machine, it is incredably SLOW!! The whole program takes a list of tasks and dates, and creates a wall calendar from them. Then (the offending part, below in code) looks at each cell on the wall calendar and formats it by sizing the height of a merged cell so that the entire task is displayed, then goes on to put a square around it (works fine).
The formating of the cell height/width can take up to 11 SECONDS each cell. What is happening to do this? Again, it USED to, and on some machines still does, FLY through this process. But now it just crawls. Code below, with the 3 offending lines identified.
Private Sub Fit_Height(ByVal Target As Range) Dim NewRwHt As Single Dim cWdth As Single, MrgeWdth As Single Dim c As Range, cc As Range Dim ma As Range
Application. ScreenUpdating = False With Target If .MergeCells And .WrapText Then Set c = Target.Cells(1, 1) cWdth = c.ColumnWidth Set ma = c.MergeArea For Each cc In ma.Cells MrgeWdth = MrgeWdth + cc.ColumnWidth Next
An additional item (clue?) is that, after the macro is done running, it is still unbearably slow to do anything on-screen. Grabbing the column header and changing the column width takes 5 seconds or so before it snaps to the desired width and displays correctly. Closing Excel and reopening it takes care of that problem.
More advancement (as I wait). It seems to be the Application.PageSetup that kills it. As soon as I hit the first Application.PageSetup line, the app grinds to a halt, and almost every line after that that manipulates the screen format or the page format takes 5 or so seconds EACH to process. I put them all at the end, but that really doesn't solve the problem, nor explain it, nor give me a true solution.
I have tried and been searching but cannot find the answer. Is it possible to change the row height and column width for only a selected range in my spread sheet, for example, F13:I23? I am using Excel 2010.
I'm trying to make this macro work to resize images for our fashion Look Book. In theory, it should work. But of course it does not Here is the code we are using:
Sub BIGcrop() Selection.Height = 507.6 x = Selection.ShapeRange.Width y = x / 2 Z = y - 144
I want all my pictures to have a height of 7.05 inches and a width of 4. The height comes out different everytime depending on the scaling of the template I'm using. I need it to adjust accordingly. I'm open to having the image move into merged cells, as long as it will first adjust the height and then crop the sides (so the orientation stays the same).
I have an export from a database that I'm bringing into Excel 2010 of about 30K records. Data points are recorded numerically and I have their associated text "value label" (what it would be called in STATA, for example, not sure what it's called in Excel). I want to create various charts/pivot tables with the data and want the labels to be the text label, not the number.
For example, variable ASSIGNMENT has the following possibilities:
1 2 3 4
Here's what each of those "mean" (I have this in another table):
1 - Sick 2 - Overtime 3 - Court 4 - Present
How do I create a chart or pivot table where the labels are "sick", "overtime", etc., and not "1", "2", "3", "4"?
In a chart if you display data labels is there a way of avoiding a zero being displayed if the relevant cell is the result of a formula? It seems that even if the result of that formula is a blank or 'n/a' it is still displayed as 0.
I have a pie chart that shows numerical values in dollars and I'm looking for a macro that will delete the $0 data labels. I found this code from Jon Peltier (great website by the way) but I can't seem to get it to work on my pie chart. No errors, just doesn't do anything:
Sub CleanUpActiveChartLabels() Dim iPts As Integer Dim nPts As Integer Dim aVals As Variant Dim srs As Series ActiveSheet.ChartObjects("MainChart").Activate For Each srs In ActiveChart.SeriesCollection With srs If .HasDataLabels Then nPts = .Points.Count aVals = .Values For iPts = 1 To nPts If aVals(iPts) = 0 Then .Points(iPts).HasDataLabel = False End If Next End If End With Next End Sub
I have a scatter chart and have applied data labels using the VBA macro supplied with Excel 2007. They pick up the cells in column A. But I now want to use Autofilter to show different ranges in the chart. Everytime I filter the chart data, the data labels change to show a different label (in fact they seem to be starting from the first label again, even if this value is not shown on the filter). I have tried to edit each data label and enter free text, I've also used a formula to link to the cell and made it absolute, but nothing is working.
The chart must be a scatter chart as it is plotting 2 values. I'm trying to create a Project Portfolio Risk Chart showing Benefits against Difficulty.
I have a Column Graph that will be changing automatically as the data is changed. My problem is that for one set of data the chart looks fine....but if a number becomes negative the bar will overlap with the data labels at the bottom and cause it to be unreadable. I am not able to resize the x axis area or move the labels down any. Is there anyway to make the labels adjust automatically?
My friend has set up an excel workbook with a sheet for every month (labelled Jan graphs, Feb graphs, Mar graphs etc) which has 7 pie charts per sheet. The problem is the pie charts are showing the 0% fields and the data labels are overlapping. I have found a macro that gets rid of the 0% labels but I need to repeat the macro for all the 7 charts on each sheet and all 12 worksheets for each month of the year. I am very new to VBA and coding of any type and have looked but can't find the solution.
The macro I am currently using for "Chart1" on "Jan graphs" is below. The charts are labelled Chart1, Chart2, Chart3 etc.
I'm using Excel 2010 and I've got a chart on a worksheet and the worksheet needs to be protected. I'm able to manipulate the chart in any fashion EXCEPT the position of the Data Labels. Is this a bug in Excel 2010?
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?
Refer to enclosed excel file, I have drew a chart base on the data in side. However, for the last column which is "SG Productivity(KUSD)", The column very small even cannot be seen, is there any way can enlarge columns in this field without changing other column? T
I have a basic bar graph showing the average home prices per quarter. I know I can turn the legend on and position it to show the average price on top of each bar in the graph. I would like to add an additional legend (on this chart) showing how many homes sold per quarter but not display it as a bar. I just want the number displayed maybe on the bar or below the bar. Can I add a separate (extra) legend?
I'm trying to resize the data labels in my chart so that the word Institutional appears on 1 line (It's currently on 2 lines) like the pic below:
but clicking the corners of the data label and dragging it does not work for me. I click on the corners and nothing happens. How I can make the data labels bigger without getting the text cut off to the next line?