I am filtering the data displayed in a chart by hiding columns. I would also like to filter the X-Axis labels by hiding columns. If I do this manually I have no problems but when I run the following macro the chart gives a reference error for the X-axis labels.
Sub ShowA2() Application. ScreenUpdating = False num = Sheets.Count Sheets("X-Axis").Activate Range(Columns(1), Columns(256)).Select Selection.EntireColumn.Hidden = False For a = 1 To 5 Sheets(num - a).Activate If ActiveSheet.Name = "A2 Data" Then Columns("A:Q").Select Range("A10").Activate Selection.EntireColumn.Hidden = False Sheets("X-Axis").Activate Columns("A:E").Select......................
I was wondering how I might be able to hide columns based on their 1st row labels with vba - I never know where these columns might be on different file I get but I want to hide the same columns every time. right now I am just specifying column numbers or letters but it's not working out:
Is it possible to hide some of the number labels on an axis; e.g. in on the chart below to hide the X-axis label 96? Or only start numbering from 97 while the chart displays from 96. Auto Merged Post;Well I have a solution to hiding the first value on the excel X axis values labels just using a custom number format;
but is there anyway of formating more than a couple of the number labels individually?
I am trying to create a worksheet that has multiple radio buttons. Each radio button is linked to a Macro. I need there to be many buttons running down one side of the worksheet. Each button needs to perform a macro that is relevant to the cells in the same row that it is on.
Essentially what i am trying to do is make a macro that when the button is pressed copys data from H6 and paste it into B6. The button is situated above I6. I need a button for each row from 6 to 110.
While this macro is easy to create (i use the record button and then assign the macro to the button), i would have to do this 104 times and assign a new macro to each button.
IMAGE1.jpg ... This list uses rows up to 1040. What I am needing to do is create a master button similar to the "Show All" Button at the top that hides any sub group automatically based on the values in the yellow box. The hide button to the right of the hardware assembly will hide the rows when pressed but that requires me to go down the list and press each button that the yellow box has a zero in. I would like to create a button that has a macro that will automatically "click" or run the hide button when its corresponding yellow box has a zero in it. If the value is greater than zero it does not need to hide that hardware group.
Example from attached image. If I were to run the new macro it would run the hide button for rows 5-8, not run the macro for rows 10-13, then again run the macro for rows 15-18, and so on until it reaches the last yellow box which is row 1036 (hide rows 1035-1039).
I have created a UserForm that has a ComboBox and depending on the number selected I want it to show that number of Labels/TextBoxes...
So if I select "0" nothing is shown, if I select "1" one set of Labels/TextBoxes is shown, select "2" and two sets of Labels/TextBoxes are shown... but also if I have selected "2" and then select "1" I want the second set to be hidden again...
Also I know I should have renamed the Label/TexBoxes to make it easer but I was adding things and making it up as I went along...
I'm using Excel 2010 on windows 7.
Code: Sub UnHide_NewRoutings() If (Engineering.ComboBox2.value) = "0" Then Engineering.Label4.Visible = False Engineering.TextBox5.Visible = False Engineering.Label9.Visible = False Engineering.TextBox9.Visible = False
I have a button (A) that will unhide worksheet A. I would like to add another button (B) that will hide(very hidden) worksheet A (if allready open) then open worksheet B, vice versa when click button A.
Code: Sub ShowSheets() With Worksheets("A") .Visible = xlSheetVisible .Activate .Range("A1").Select End With End Sub
I'm trying to disable the [x] in the upper right hand corner to force my users to use my "Close Workbook" button, but not sure how to do it. Then, was thinking that I might just want to hide the entire Application Title bar...
I am using several toggle buttons to hide/show rows of data related to the specific toggle buttons. I also want to hide and show the toggle buttons as well. When I try to do that the data underneath the toggle buttons is hidden but the toggle buttons don't hide with the cells.
A solution for the problem that I am having would be to have the ability to click on a cell as if it were a toggle button and hide/show rows of data when clicked.
If there is a way to hide/show buttons as well would work too.
1: Is their anyway I can get rid of the File, Edit, View, etc buttons at the top of the document so everyone that opens it can not see them? and also the save button, the idea is they have to use the button to save the sheet.
2: I have a button on the sheet with a macro that saves the sheet once it has been worked on, the sheet flashes when this button is clicked is there any way I can stop the sheet flashing ?
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"?
I have a worksheet that is just a list of items with a location listed next to each item. I took that list and made it into a pivot table and would like it to have it list the items with each location it is in displayed across. I have already set it to tabular form in the pivot table options, but if there are multiple locations it lists them vertically and I want them list horizontally for printing purposes. I have attached a screen shot to explain.
How can I put another label under each bar (NOT outside end or inside end or any additional label. This is an actual label? For example, under the first blue bar labeled 56.7%, I also want to put N = 50 below the X-axis, above "Optimal." I also want to put N = 25 for the red bar immediately next to it labeled at 75.7%.
This is not a label, as it is below the X-axis.
An example of this can be found here (scroll down for second chart)
I am displaying cells in textboxes depending on the results of a listbox selection. I was wondering if there is code for making the textbox names variable (so I could just loop through the offsets and textbox names)
the code below works but I would like to make it more versatile and shorten it. There are other textboxes on the page.
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.
Ok ive been playing about with excel for the past week to get a spreadsheep up and running so i can see the totals of some things and now its getting a little complecated for me (ive done the easy stuff lol)
Ok here is the situation and i'll try and explain what im doing as best as i can. Im trying to make a spreadsheet that shows how much a resorce can be refined so lets say in a1 to c1 i have 400 in each but i can mix a with b and b with c at the ratio of every 20 of a and c to ever 10 of b
so somewhere in my spread sheet id have the result 20 and 20 as products ato c can make 20 of product d and e i hope that makes sence?
for every 20 + 10 of a(400)+b(400) = 20 and for every 20 + 10 of c(400)+b(400) = 20
so if i had 600 300 600 instead of 400 i can only make 30 of product d of e (id have to choose)
I need to format the background color of a row using an if statement or something similar. If have a certain cell has a specific value I want the entire row that the cell is on to have a specific background color.
I have a workbook with 20 worksheets. Sixteen of them represent the months and quarters of the year. On those 16 sheets, I would like to have two buttons (32 buttons in all). One button is to print (and does quite a bit of formatting) the report for that month and the other submits the report (formats, saves, and e-mails notifications) after the user completes it.
Rather than having to maintain 32 buttons, I would prefer to have two buttons that are available to each of the 16 sheets. Is there a way to do this?
I have approximately 20 sheets that all have 4 toggle buttons on them. Coded as below (with different ranges for each button). So when I wrote them I took the easy (for me anyway) way and copied all the code for all the buttons in each sheet. (Buttons are named Zoom1, Zoom2 etc.) Private Sub Zoom1_Click() If Zoom1.Value = True Then ActiveWindow.Zoom = 143 Range("A1").Select ActiveWindow.LargeScroll ToRight:=-10, Down:=-10 Else ActiveWindow.Zoom = 75 ActiveWindow.LargeScroll ToRight:=-10, Down:=-10 End If End Sub.........
I have another question with my red sox scores excel sheet. On my overview I want to be able to select any team, and view the indiviual stats against them. For the life of me I dont' know/can't find how to even do a simple yes no if statment to what the value in the drop down menu box is.
I don't even know if using the IF statement is the right function, but anyway. I am using VLOOKUP to complete a supply list, but of course if the supply name isn't on the first spreadsheet then the result is NA. Instead I want it to return 0.