I have received following macro from someone to delete series but the problem is that it gives error when some sheets are protected, and I want those sheets to protected. When run it will ignore/leave protected sheets but delete series only from unprotected sheets
Private Sub CommandButton1_Click() Dim Rng As Range, i As Long, r As Range, lVal, uVal Dim DeleteCount As Double Dim lRow As Long Dim dr As Long Dim dc As Long dc = Sheets("Deleted Numbers").UsedRange.Columns.Count - 1 dr = Cells(Rows.Count, Sheets("Deleted Numbers").UsedRange.Columns.Count - 1).End(xlUp).Row + 1 If dr = 60001 Then ................
I have a spreadsheet which has all the names of trips from a warehouse, the day that they operate (1,2,3 etc) and the job line allocated to each trip. It looks something like that:
A B C DAYTRIPCUST
I would like to create a macro that will be creating 7 new workbooks and then in those workbooks as many sheets as the trips. In these sheets, the customers should be displayed.
How do I write it? I could not find how to have a "dynamic choice" in the macro. I.e. not to have the criteria as "1", "trips1" but to choose from the range of inputs that are available.
I have a sheet open that I would like to have a chart like...umm...floating in front of?
First off I want the same "chart" (or block of cells) to be on all sheets of my file so if I enter information into it on one of the sheets it'll be the same on all of them. That's the most important part.
The other thing I'm looking to do with it is I would love for it to remain stationary when I scroll up and down on the sheets. So basically the left half of my screen would scroll up and down but the chart on the right would stay put in my line of vision no matter how far down I scroll.
I'm currently working on a workbook that has over 50 different sheets. On each sheet there is a column K that I want to graph if desired. From the Main sheet I would like to have checkboxes or something, so that when I press on it, the data from sheet x is added in the graph. Can this be easily done? It's not a problem to hardcode the which-button-calls to-which-sheet (just takes some time), the main thing I cant work out, is how to add a series to a chart, how do delete a series from a chart and so on..
I’m would like to delete some sheets in my workbook using a macro. The problem is that I won’t know in advance the name of these sheets.
I was thinking using a code like the following one to delete the sheets but the problem is that Excel expect a sheet name at this part of the code since it is expecting the sheet name.
Sub Delete_Active_Diagram() Application.DisplayAlerts = False Dim i As Integer Dim strSheetName As String Dim blnFound As Boolean
strSheetName = "Average Sales Per Week" & "" & Sheets(i + 1).Range("C3") i = Sheets.Count
For j = 1 To i If Sheets(j).Name = strSheetName Then
blnFound = True Exit For End If Next If blnFound = False Then Exit Sub If blnFound = True Then strSheetName.Delete End Sub
Is there a way to cope this problem, or should i think about another way to do it. Like selecting each sheet I would like to delete and then delete the selected sheets.
By the way. All the sheets I try to delete a Charts Sheets. Maybe there is a way to delete all the charts in my workbook.
I want to do is be able to take The data from one week for every store and compile it into a chart to show a summary of the company as a whole. I know that I can reference from that chart to each worksheet the values I want, but how would I give that chart the ability to update each time I add a weeks worth of data.
I have attached a file that shows what I am talking about. The sheets labeled Waterloo, Mogadore, through Green are the sheets for each store.
I want to take the last weeks data and put it into a chart as seen on Sheet1. Then when I add data for 3/21/09 I want to make a new chart without retyping the data into the chart.
1) Is it possible to write a macro that will resize fonts in a chart (axes, text boxes) to specific sizes?
2) I usually copy chart sheets and paste them into Publisher but I have to resize them because they are huge when pasted. I would like to create a toolbar command that will take the selected chart sheet (not just a chart in a worksheet) and resize it and its components (part 1) to specific dimensions, then copy it as a picture so that I can simply go to Publisher and paste the chart after pressing said button in Excel.
I want my charts to be located in a new sheet each. I also need their names to start with "GR-Chart[number here]". So they should be GR-Chart1, GR-Chart2, GR-Chart3,......
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:= "GR-Chart" & [this part I got wrong]
I am using Reafidy nice bit of code to hide worksheets if the user disables macros. The problem, though, is that it doesn't work for Chart Worksheets. How should I adjust this to accommodate charts?
Private Sub Workbook_BeforeClose(Cancel As Boolean) bIsClosing = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim wsArray() As Variant Dim iCnt As Integer Application. ScreenUpdating = 0
I need drop-down combo box to change a graph based on the option selected in the drop-down
Challenge: my Combo box resides on the First sheet only, but the items that populate in the drop-down list are dynamic and change depending on how many sheets exist for this document. The options in the list are Overall, Week 1, Week 2, ... Week N. Overall needs to sum up the data (or I can pull just from the summary page if I am lazy) and the Week N corresponds to a specific sheet added.
I currently am able to get my drop down to populate items correctly, and my macros to create the sheets dynamically with templates just fine (not bad for newbie).
So what I need to figure out is how to tie my drop down to make a scatter plot/bar graph based on the selected option and action. I can't find an attachment option here but here is some code:
Sheet 1 Code:
Code: Private Sub Worksheet_Activate() Me.ComboBox1.Clear Me.ComboBox1.AddItem "Overall"
I have the below code working but not doing everything that I expect. It counts the number of columns on one sheet and copies the headings to rows to another sheet. One thing is that sometimes there are more than 10 headings and there are only room for 10 rows. So after 10 I need to insert rows. Currently the below code counts and inserts rows correctly but for some strange reason it only copies headings to rows for the first 9.
I have a table of values that are computed using input values from the first column (y's) and first row (x's). Each value in the table (z's) has a unique set of x and y.
In order to plot z vs x and z vs y I need to create a list of unique x,z and another of y,z. My question is how most efficiently to thus turn this table "inside out." The table will be very large, or I would do it by hand.
I have an excel work book that I want to extract certain info from Each tab where in the result tab I use this formula to get required data from another tab.
I has about 24 tab , in the 25th one i collect data from all previous , using below formula inside each cell to get
However, I want the formula to count values when ABS($AM:$AM)=ABS($AM15) but I get an error if I try to put ABS($AM:$AM) as my range. Is there anyway to set my range as the absolute value of Column?
I have this: =LOOKUP(Budget!J3,B11:B42,E11:E42) RESULT: 5%. what I want: =LOOKUP(Budget!J3,B11:B42,(X3)11:E42) RESULT: 5%. I want excel GET the value inside X3 and and go to the other sheet with this variable. X3 = E
I'm trying to calc a Simple Moving Average of financial Fund data (row=fund type, column=date) on a very large matrix for a particular fund and date range. I locate the Fund of interest and retrieve the Start and End dates of interest and retrieve their addresses using the ADDRESS function. Since ADDRESS returns a text string, HOW DO I incorporate it's results into the following array function (which ignors blanks and 0 cells): {=AVERAGE(IF($L$10:$V$10>0,$L$10:$V$10,FALSE))}?
I am trying to create a For Loop where the RND from array column sptemp(i,2) is static throughout the entire loop when I pull the data out separately by columns to create a chart. The data works perfectly if I print it out on the excel spreadsheet via ctrl+shift+enter as an entire array but I am trying to graph the columns and the RND is updating and not syncing with the same random number, as sptemp(i,3) and sptemp(i,5) are both linked to sptemp(i,2) which is the RND. I am trying to graph column 3-5 on the Y-axis and column 1 on the X-axis, and column 3 and 5 should look identical after subtracting column 4.
I'm trying to get dropdown in cell. Depending on what is chosen, I then want another dropdown in the same cell of either New or Old for the item previously chosen. Hopefully the example helps because even I'm confused by this.