Delete Specific Type Of Chart From Active Sheet

Feb 20, 2009

i'm trying to delete a specific type of chart from the active sheet using this macro:

View 2 Replies


ADVERTISEMENT

Macro With Reference To Active Chart On Active Sheet

May 14, 2014

I currently have the following macro running to set a chart's data values:

Sub C3Quarter12013()
'
' C3Quarter32013 Macro
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Values = _

[Code] ......

When I copy the tab and change some of the data within the cells, I want the macro refer to the chart on the current tab and the values in the current tab - as currently it refers to only "Chart 2" and the values in the tab 'Figure 2 - WE OPH'.

I've tried changing the sheet name to ActiveSheet.name but that doesn't seem to work.

View 4 Replies View Related

Copy Cell From Specific Sheet & Paste To Active Sheet

Mar 31, 2008

I would like a macro that will go to a fixed sheet, copy the format, go back to the previous sheet and paste the format. My problems arise going back to the previously activated sheet rather than just a fixed sheet.

View 2 Replies View Related

Reference Chart By Name That Is Not On Active Sheet

Feb 21, 2009

I am trying to select cells, tables and charts by just knowing their name. Thus if possible I would like to only refer to a chart by its name i.e. not know what worksheet they are on. This seems to work for named ranges of cells/tables, but not charts (I can't get my named charts to appear in the "Define Name" dialog).

I found this code that loops through charts on the activesheet and shows the names. However, I would much prefer not to have to specify the sheet or to loop through all the sheets trying to locate the one with the named chart.

Public Sub GetEmbeddedCharts()
Dim myChart As ChartObject
Dim myCharts As ChartObjects
Set myCharts = ActiveSheet.ChartObjects
For Each myChart In myCharts
Debug.Print myChart.Chart.Name
Next
End Sub

View 4 Replies View Related

Rename Embedded Active Chart Sheet Name

Jan 17, 2008

For example, a cell on the screen is blank. When the page is printed, the "blank cell" has printed text.

I checked "format cells" and it shows word wrap, merge cells, and left to right.

I was told to "un-merge" the cells. I did that and I still have the problem.

The color on all the cells is OK at a blue shade. When I look at print preview the cells are blank, but when the sheet is printed, the text shows.

Also, it looks like there are 2-3 cells inside the main cell.

I hope I have explained this properly, it is not easy to use the correct language to describe since I am not very good at using Excel.

View 4 Replies View Related

Delete Rows That Contains Zero And Copy Active Sheet To New Sheet

Oct 2, 2009

I want DELETE the rows that contains 0 (zero or -) in column F (SALDO BRUTO), when I click the Button (Clear). And How I can copy from this sheet to a new sheet in this workbook, but the names of new sheet automatic rename to next date or 2, and next when I click the Button "Copy to New Sheet".

View 2 Replies View Related

Delete From Non Active Sheet

Nov 22, 2011

I am not sure why this code won't delete, I can't believe excel requires the sheet to be active to delete from. It will only work if the .activate line is included.

How can you delete from another worksheet without first switching to it?

Code:

'Sheets("sheet1").Activate
Sheets("sheet1").Range(Cells(row, col), Cells(row + 7, col)).Delete shift:=xlUp

View 3 Replies View Related

Create Macro To Chart Data With Location As Object In Active Sheet

Oct 11, 2006

I have been trying to create a macro in excel to chart a selection of data and to output the chart on the active sheet where the data was taken (as opposed to a named sheet). So basically, I have about 300 worksheets with data, and I would like to have a button on each page that automatically charts that data when clicked, and outputs the chart to the page where the macro was clicked. However, I have not been able to figure out a relative reference that will allow me to make the LocationasObject reference simply the ActiveSheet as opposed to a specifically named sheet. See my code below, which references an output to a worksheet called "Charts". Right now, all of my charts are outputting to the sheet called "Charts", as opposed to the active sheet.

Sub ConsDiscChart()
ActiveCell.Offset(29, 11).Range("A1").Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1:B1").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveCell.Offset(0, -1).Range("A1:C24").Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.Location Where:=xlLocationAsObject, Name:="Charts"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
End Sub

View 5 Replies View Related

Delete Shapes But Not Active X Controls Box On Same Sheet In VB

Mar 12, 2013

I have an active x control command button on the same sheet as some shapes (lines,circles) which are generated from some parameters. I want to be able to delete the current shapes so I can plot the next shape. Below is the delete shapes part of the code, not sure how to complete the code.

Currently, the box is getting deleted as well as the shapes

Code:

Private Sub CommandButton1_Click()
Dim line1_Beginx As Single, line1_beginy As Single, line1_endx As Single, line1_endy As Single
Dim line2_Beginx As Single, line2_beginy As Single, line2_endx As Single, line2_endy As Single

[Code]....

'Calculate positions of line vertices for plots

line1_Beginx = 1000
line1_beginy = 1000
line1_endx = 1000 + CD_2
line1_endy = 1000

[Code]....

View 2 Replies View Related

Select/Delete Worksheet Text Boxes Using VBA On Active Sheet

Nov 10, 2009

I could use some assistance in creating a macro that will delete all and only text boxes on the active sheet. Some text boxes will be empty, but I still wish for them all to be deleted. Through searching the forums I see a similiar code, but it deletes all shapes on the active sheet:

View 8 Replies View Related

VBA To Print Active Sheet To PDF Auto Save In Specific Folder Then Mail Using Outlook

Jul 17, 2014

How do I write a vba code to print active sheet to pdf, auto save in specific folder then mail using outlook

im using 'Nitro PDF Creator'

also id like it to automatically save the pdf as the same file name as the active worksheet and also auto enter the following when opening the email server:-

Address: Cell D18
Subject: Cell D21
Email body:

find attached quotation

Optional installation available on request

View 2 Replies View Related

Delete Duplicates On A Specific Sheet

Sep 28, 2009

I found the following code to delete duplicates. I want the code to work on close and only on a specific sheet....

View 3 Replies View Related

Copy Of Sheet From Specific Workbook To Active Workbook

Mar 6, 2014

My requirement is as follows......

I want to get a copy of worksheet from specific workbook to active work book in which i want a copy of sheet get moved.

View 2 Replies View Related

Sheet Of Data - Delete Rows That Do Not Meet Specific Criteria

Nov 29, 2011

I have a sheet of data. The data starts in row 4 and can be variable in length. I want to delete rows that do not meet a specific criteria, for example a location, Leeds, which is in column "i" of the table. I have written the below but it seems to delete data from row 1 rather than row 4 and repeat down each row

Code below

Sub deleterows()
Dim i As Integer
Dim intCounter As Integer
Dim strLocation() As String

p = Range(Cells(4, 6), Cells(4, 6).End(xlDown)).count

[Code] ..........

View 3 Replies View Related

Specifying Chart Type In A Macro

Jan 26, 2009

I recorded a macro where a xyscatter graph is produced with markers connected by lines.

Is there a way to change to to force the graph to be a xyscatter graph without lines?

View 4 Replies View Related

Pivot Chart Type Changing

Feb 15, 2010

I have an issue with pivot charts that I can't figure out and I can't find anyone with the same problems either. I have several big reports that use data from 2005 onwards that need to be represented on graphs separated by the city the data belongs to and different ranges of the results. This data is being sourced from inside each workbook on another tab and turned into a series of pivot tables (for each city) which provides the source for the charts. I did it like this because if I use pivot graphs I don't have to go through and individually change the data source range in the charts every time - because there are so many.

My problem is that when I refresh the pivot tables (to bring in the new data) the pivot charts 'chart type' resets. They should be represented in a Line - Column on 2 Axes chart and I have set this as the defult type but after refreshing it reverts to a basic column graph and I have to go through and change them all back manually. I made a macro that acts on a currently selected chart to change the format to make this process a bit faster:

View 2 Replies View Related

Chart Type For Data Comparison

Oct 23, 2006

I am trying to figure out a way in excel to graph some data I have in a new, sophisticated type of chart. My data is new square foot sales divided by new square feet (for a retail store). It is a dollar amount. I also have this data as a percentage change year over year. If I want to compare two stores with different data -- what would be the best way to present it on a chart. Is there a way to show this on a 3-D plane so that both companies have the data in the same chart up against each other?

View 2 Replies View Related

The Specified Dimension Is Not Valid For The Current Chart Type

Feb 19, 2010

when opening the workbook with Excel 2010 beta I folllowing error:

Run-tim error '1004':

The specified dimension is not valid for the current chart type.

View 9 Replies View Related

Change Default Chart Type & Color

Sep 7, 2007

I was just wondering if there was a way of changing the excel chart default so it doesn't always return a grey (or gray for those of you over the pond !) plot area every time I create a chart. It looks rank and wastes toner IMO.

View 8 Replies View Related

Chart Type To Choose - Assign Particular Column To Particular Axis Only

Jan 16, 2014

I have a excel with data values in 5 different columns.

Column A: Time in seconds (1,2,3,4,5.... so on) continuously in equal intervals.

Column B: Values Generated by my machine at each second (random values)

Column C: Values generated based on column B using a formula (Let formula be denoted by " F ").

Column D: Highest possible value of calculation on column B (With +ve error consideration in formula "F")

Column E: Least possible value of calculation on column B (With -ve error consideration in formula "F")

Two graphs need to be generated as follows:

Graph 1:
X Axis: time values ( From Column A )
Y Axis: Corresponding machine generated values from Column B

Graph 2: Envelope
X Axis: time values ( From Column A )
Y Axis: Both value of column D & E ( Time value 1 sec has two corresponding values, one from Column D and one from Column E)

Both values of Column D and E be plotted and the area between two lines generated by upper limit and lower limit (Column D and E respectively)

So for both, what chart types should I select, and how do I assign that particular column to that particular axis only.

View 2 Replies View Related

Select A Chart Type In A Userform Using Option Buttons

Jul 14, 2006

I have made a simple procedure (which will extend to make something that I have to make but for time being) it asks user to select a chart type in a userform using option buttons and then the chosen chart type is taken as the chart type and makes the chart.

problem is that the typechart - variable to identify the chosen chart type - is not being recognised. Here's the coding, the variable is not passed (in yellow bolded) from one procedure to another?

Private Sub NextButton_Click()
Call ShowType
If bFlag = False Then
MsgBox "Not Selected"
Call ShowType
Else
Call MakeChart
End If
End Sub

View 5 Replies View Related

Gantt-type Chart With Quarterly Marks On The Date Axis?

May 22, 2014

I'm using a stacked bar chart (in Excel 2010, running on Windows 7) to create a simple Gantt-type chart - with just four or five bars. I've got my chart looking most of the way I want it to, but one thing still eludes me: I'd like to set up the major axis ticks to be quarters of the year (from 1/1/2011 to 4/1/2013). Since quarters are not regular intervals (they are not exactly every 90 days), I can't do this using Excel's standard functionality for choosing axis tick marks.

View 3 Replies View Related

Window Explorer With Specific Document Type

Apr 22, 2009

I am using the Application.GetOpenFilename command to open the window explorer view. Is there a way to minimize the selection to a particular doc type .
Example all Excel (xls) work book only or All Text (.TXT) only?

View 2 Replies View Related

Cell Formatting - Type In A Word In Sheet 1 Say Mike On Sheet 2?

Jan 28, 2014

I was wondering if there was any way to do a cell format so that if I type in a word in sheet1 say "mike" on sheet2 the word "mike" cell would be highlighted? or if there is a formula you could use to do that.

View 14 Replies View Related

Return Plank Not A 0 On 2nd Sheet When Nothing Is Type On Fist Sheet

May 8, 2014

I have 2 sheets in a work book both contain the customers address if I leave a line not type on on sheet 1 then it will put a 0 on sheet 2 is there a formula to stop this happening.

View 3 Replies View Related

Showing Only Active Months In Chart Data?

Feb 5, 2013

I've attached a chart with variance data for each month of the year. I've used an IF formula to "NA" the months with no data, so nothing shows up in the chart. However, I would like to know if it's possible to have the chart only show months with data. The IF formula gets rid of the data point but it doesn't prevent the chart from showing the month on the X axis. In the attached file I manually selected the three months with data.

View 4 Replies View Related

Delete Rows With Specific Characters In A Specific Column

Dec 10, 2007

Currently I am using the Kickbutt VBA Find Function of Aaron, but I would like to have something that works more efficiently. What I currently do is (assuming all possible values for Column J are A - F):

Find_Range("A", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("B", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("C", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("D", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("E", Columns("J"), MatchCase:=True).EntireRow.Delete

although I just want some code that says: delete all rows except those that have "F" as content in Column J. I already tried something like:

Range("1:65536").Select
For Each cl In Range("J:J")
If cl.Text = "A" Or cl.Text = "B" Or cl.Text = "C" Or cl.Text = "D" Or cl.Text = "E" Then
Rows(cl.Row).Delete
End If
Next

but it also takes much to long. The major problem I think, is that the number of records is variable so I search the entire worksheet...

View 5 Replies View Related

Select Specific Row In Active Column Using VBA

Oct 8, 2013

I need a macro that will select row 15 in the active column. (basically returns to the top of the data where rows 1-14 are frozen in place, only in the current column).

I have been able to accomplish the opposite (skip to specific column while maintaining active row) by using the code below:

Range("V" & (ActiveCell.Row)).Select

But it does not work when I try the reverse:

Range((ActiveCell.Column) & "15").Select

View 3 Replies View Related

Delete Active Workbook

Oct 10, 2004

if it is possible to delete the current workbook that is open?

I'm thinking of using an add-in to delete the workbook i'm viewing

View 9 Replies View Related

Delete Row Of Active Cell

Mar 26, 2008

I have a macro for deleting a row. I want iit to delete the row that I have selected, that is i if I mark cell B22 I want it to delete row 22. But it deletes the row under it, that is 23.

Sub Tabortrad()
Dim intRadnr As Integer
Dim intStartrad As Integer
Dim intSlutrad As Integer
intRadnr = ActiveCell.Row
intStartrad = ActiveSheet.Range("Första").Row + 1
intSlutrad = ActiveSheet.Range("Sista").Row - 2
If intRadnr < intStartrad Or intRadnr >= intSlutrad Then
MsgBox "Kan inte radera denna rad. Placera markören på en av bokföringsraderna mellan rad " & intStartrad & " och rad " & intSlutrad - 1 & "." & Chr(13) & "En ny rad kommer att infogas under den rad där markören står.", vbOKOnly, "Felaktig rad markerad".......................

View 2 Replies View Related







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