Identify Correct Embedded Chart With VBA Macro

Oct 8, 2008

I have several charts embedded in a worksheet, and I would like to use the ChartObjects Method in VBA on some of them. That requires knowing the index number of the charts I want to work with. Where/how do I get that? (For example, in the VBA Project Explorer window the only listed objects are sheets. Is there an object explorer with a chart list?)

View 2 Replies


Find The Embedded Chart Object Name?

Nov 10, 2008

Is there a way to find the embedded chart object name?

View 9 Replies View Related

Hide Text Box On Embedded Chart

Mar 27, 2008

I have a workbook with two worksheets. On the second worksheet I have placed a chart, in which several shapes (text boxes) have been added manually. With the help of a TickBox in a UserForm on the first worksheet one can hide / unhide one of those shapes (on the second worksheet). By using the Macro recorder I finally came to this code fragment:

Application.ScreenUpdating = False
Worksheets("Second One").ChartObjects("Chart 41").Activate
ActiveChart.Shapes("Text Box 4").Visible = False
Worksheets("First One").Activate
Application.ScreenUpdating = True

Obviously another part of the code is used to make the shape visible again. roblem: The screen flickers. And I want to be able to do this without flickering. Searching Ozgrid revealed that the use of "Activate" makes the screen flicker. Hence, my question: How can I hide / unhide a shape (textbox) in a chart on another worksheet without of using "activate"? r: Any other way to hide / unhide a shape (textbox) in a chart on another worksheet without flicker?

View 2 Replies View Related

Moving Embedded Chart Series Via Mouse

Apr 2, 2007

I have an embedded chart with a data series and a horizontal line that changes position (y-intercept) by values entered into a textbox. To make the process more user friendly, I would like to allow the user to select this horizontal line and reposition it inside the chart with the mouse. The new y-intercept of the line should then be displayable (textbox, cell, whatever). From what I have read on Peltier's site, I will definitely need to write a new class. Classes in VBA is not something I am particularly familiar with..

View 5 Replies View Related

Sheet Names As Embedded Chart Titles

Jan 9, 2008

I have a spreadsheet that has multiple sheets and each sheet has a graph, at oresent if i have to add a new sheet and graph i copy the last sheet, rename the tab then off we go, but i alway have to remember to also change the sheets graph title. is a mechanism so that if I change the Sheet Tab name then the chart will use the sheet tab as a chart title.

View 2 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

Correct Procedure Results In Wrong Chart?

Jan 5, 2014

Although I follow the usual procedure for Chart insertion, the resulted chart is missing data.

View 5 Replies View Related

Print Correct Chart Based On Last Month

Jun 14, 2007

to print last months results each month. I have a cell (range name = LastMonth) with formula =now()-15 to display last months full name since I will always do this in the first half of each current month.

I want it to look at that cell on the "FY" sheet, see what month is displayed
then go to the "Monthly Audit By Cell" sheet & print the correct chart.

Each chart is named "Jan Audit" and so forth

I have this - only first six months done so far. Problem is nothing happens-no printing!

Doing this today on June 14th should print out the May chart.

' Print the Audit for the current month

View 9 Replies View Related

Identify Breakeven Point, Or Positive To Negative, On Chart

Dec 10, 2007

way to insert a Line where the (x) line on a chart is breakeven or the instance where it changes from positive to negative. I am doing this now by just drawing a line, however with a chart that is constantly updating the line does not adjust to this.

View 9 Replies View Related

Countif Formula: Added The Correct Amount In The Correct Cells

Feb 15, 2010

I'm trying to create a formula that will added the correct amount in the correct cells, I have create a dunny sheet in trying to achieve this. If Cell B8:B11 = ABS or Dum that any points won should be added to Cell L8:L11 right now its adding it into K8:K11. If Cell B8:B11 = is Blank any player points should be added to cells K8:K11. I'm using this formula throughout cells K8:K28 =IF(J8>J25,1,IF(AND(J8<>0,J8=J25),0.5,0)) Any thing in red is incorrect anything in blue is what I'm trying to achieve.

View 4 Replies View Related

Check Cells Are Correct Format And Contain Correct Data

Jan 26, 2014

We receive about 20 sales files of several hundred lines of data each day from various agencies. I want to create a macro / VBA code which checks that the data submitted is correct so that we can upload it into our database without import errors and / or having to manually check each line of data.

I envisage something like an output report:

149 entries
Column A - Date - OK
Column B - Customer_Phone - Errors (Should be 11 digits)
Row 21 - Customer_Phone - Error (Not 11 digits)
Row 108 - Customer_Phone - Error (Contains letters)
Column C - Outcome - OK
Please correct and re-check.

View 4 Replies View Related

Sumproduct- Counts The Correct Amount But Not With The Correct Dates

Jul 3, 2008

I have a table with 3 columns of dates and then a column with Set # that I
feel in the box #.

I need to see how many items processed for each set per day.


The problem is that it counts the correct amount but not with the correct
The formula that I use is:

View 14 Replies View Related

Macro Not Looping To Correct Position

Sep 19, 2006

I'm having trouble with a macro not looping back to the right place. The macro runs fine but is looping back to the very beginning instead of to the DO WHILE point which is the bit I would like to loop through. The code I have posted is a little long I am afraid (with the first part being largely irrelevant to the issue I am trying to solve), but I have marked where I am trying to get the macro to loop though.

Sub Collect_Trade_Data()

Dim y As String

Dim strResult As String
strResult = Dir("K:BTSFilesMQ_FromBloombergutilities.txt")
Select Case strResult
Case ""

Case Else

Application. ScreenUpdating = False

Workbooks.OpenText Filename:="K:BTSFilesMQ_FromBloombergutilities.txt", _
Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _ ...............................

View 9 Replies View Related

Chart Hyperlinks: Attach A Macro So That When The Chart Is Clicked It Returns To Sheet - Home

Feb 24, 2007

I know this has been discussed a number of times, but here is my problem
I have three charts in my workbook. I want to attach a macro so that when the chart is clicked it returns to Sheet - Home. I have using the following:
worksheets("Home").activate. But after I protect each chart and the workbook, and save and exit. When I reload the Workbook it has forgotten the assigned macros and nothing happens.

View 7 Replies View Related

Macro To Identify Top Ten Frequencies

Mar 31, 2012

I have a list of over 3000 numbers, many of them duplicates, and would like to write a Macro that lists down the top ten most occurring numbers, in the correct order, with their respective frequencies.

View 3 Replies View Related

Macro Identify The Date

Sep 26, 2007

I am working on a file where the data for numerous customer gets uploaded on a daily basis.
So we have to update our record daily for respective customer.

In the attached file, Sheet1 provides data to be uploaded. I have included only 5 customers in my example).

I want a macro which can first identify the date (cell F4 in tab Sheet1) for which data is available in "sheet1" & then uplaod the same for respective customer & date in tab "sheet2" & "Sheet3".


******** ******************** src="">*********>Microsoft Excel - QUERY.xls___Running: 11.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutF4=
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box


View 9 Replies View Related

Macro To Identify Duplicates

Jun 27, 2006

I am trying to write a macro to check for duplicate numbers. My logic is as follow:

If(A2-A3=0) Then

I want to write the macro as follow:

Select Check>0
Do While Check <885
If(A2-A3=0) Then
End If

View 6 Replies View Related

Sum Macro With IF Formula - Enter Correct Value Into Column

Dec 8, 2011

I want to create a Macro that uses IF statements to enter the CORRECT VALUE into COLUMN “Q” in the ACTIVE WORKSHEET. I am providing an example of what the data set looks like at the very bottom of this post. I want to use a Macro as oppose to Formula in the worksheet because I want to turn the Macro into an Excel Add-In.

I want the Macro to do the following THREE THINGS:

1. IF the Value in COLUMN L is “0” THEN enter “n/a” into COLUMN “Q”
2. IF the Value in COLUMN L is “2” THEN enter “n/a” into COLUMN “Q”
3. IF the Value in COLUMN L is “1” THEN use a formula that looks like this:

= O8 + ( ( O8 / P8 ) * (First SUM the HOURS in COLUMN O for all the ROWS that have the SAME VALUES in COLUMN C and H and a “2” in COLUMN L and then MULTIPLY that Result against those rows with a “1” in COLUMN L whose COLUMNS C and H values match up exactly with those of the Summed Hours). The RESULT of the FORMULA would be entered into COLUMN “Q”. Once you look at the example at the bottom of this post it will definitely start making sense. I highlighted rows 8 – 11 for you in red in the data set at the bottom of this post just to center the attention on the rows I am talking about.

Here is an example of how the formula will work:

I will use ROW 8 from the data set below as an example. From the dataset I know CELL O8 equals 10 and CELL P8 equals 76. Now I will SUM the HOURS in COLUMN O ROWS 10 and 11 for ALL ROWS that have the SAME VALUES in COLUMN C and H in this case the values are “Times” and “PM” and contain a “2” in COLUMN L which happens to equal 3, then that 3 should only apply to those rows with a “1” in COLUMN L whose COLUMNS C and H values match up exactly with those of the Summed Hours. So now I plug that into the formula: =10+((10/76)*(3)) and MY RESULT which will go into COLUMN “Q” IS 10.395.

Here the DATA SET:

Col A Col B Col C Col D Col E Col F Col G Col H Col I Col J Col K Col L Col M Col N Col O Col P Col Q Col R Col S Col T
Row 1 B ID Name Org Div T Number Model Make S Function E Function Type Description P ID OG Hours Sum EA P Hours Sum P S Hours EQ

This is what is happening in Column Q Explanation of Formula

Row 2
28 28 n/a

n/a If formula populates Column Q cells with "n/a" if Column L cells contain a "0" or "2".

Row 3
404 1194 413.4740369

O3+((O3/P3)*28) You get the Sum "28" by adding all the "P Hours" in Column O that match these 3 values:
1. The "Org" value of "Times" in Column C
2. The "S Function" value "Cont" in Column H
3. The "P ID" value "2" in Column L

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

View 9 Replies View Related

Macro To Convert Dates To Correct Format

Jun 7, 2013

When I import data , the dates appear as follows in Col G sheets "Imported Data"

If I select Col G and use Text to columns and select mdy, it gives me the dates in the correct format. However, If I use the macro recorder to do this and then run the macro, it does not work

I have attached the dates after using text to Columns wjhich is the correct format.

Imported Assets *G207/01/2006302/01/2007402/01/2007511/01/2008601/01/1985720/11/1990801/01/1985901/01/19851001/01/19851101/01/19851225/09/19921302/01/1993

Imported Assets  G201/07/2006301/02/2007401/02/2007501/11/2008601/01/1985720/11/1990801/01/1985901/01/19851001/01/19851101/01/19851225/09/19921301/02/19931401/05/19931501/06/19931601/08/19931701/01/19941801/09/1995

View 2 Replies View Related

Faulty Macro Run While Automatic And Correct While Manual (F8)

Aug 1, 2013

Is it possible that the very same macro runs kind of incorrectly while it's being run as "automatic" (F5 key) and absolutely correctly while run manually, line by line via F8 key?

I am trying to debug the code but no luck as I get proper results while run manually.

View 6 Replies View Related

Importing Data In Correct Format For Macro To Run

Aug 17, 2008

We have a system that normally dumps our data in the format of column K, with all of the data in one column and the same spacing you see below in red. The problem is when the system is slow, we have to manually dump it, and when we manually dump it, it comes out spread out from column A to column I. For the macro to work without bugging out on me, it has to be in the same format as column K, with exactly the same spacing.

I have tried text to columns while importing, amongst other things, but have not had any luck. So in a nutshell I need to be able to make column A thru I, look just like column K with exactly the same spacing. The data dumps are different every day.

I have a strange feeling I will not get a reply on this question, because it is so strange, or that I failed to articulate it correctly....

View 9 Replies View Related

Macro To Identify Red Cells In Sheet?

May 1, 2013

I have an excel sheet that has conditional formatting. Whenever few cells are not in required format, the cell's backcolor will become red. I am trying to design a macro to check if there are any cells in red due to conditional formatting.

View 1 Replies View Related

Command Button: Prompted For A Password And Then If Correct A Macro Would Run

Jun 11, 2009

I would like to create a command button that is available on my worksheet at all times. When clicked the user would be prompted for a password and then if correct a macro would run. If the password is incorrect then the user would receive an error message "You do not have access to run this maco" and he could go back to entering his values.

View 9 Replies View Related

Macro To Copy And Paste The Correct Amount Of Rows

Mar 3, 2010

I want to create a macro that will copy and paste a couple seperate collumns but the problem is that each month, and each invoice, contain a different amount of rows so I can't "record" a macro. Lets say I start on A4 which is the heading of Column D..below it are a bunch of records at the end of the records is a space. I need it to stop there. Then do the same for Column G, I, etc. I would like it to copy each column and paste in a new workbook.

View 9 Replies View Related

CountIf Macro Identify When Cells Are >= 90% In A Range

Jan 12, 2010

I need a macro to identify when cells are >= 90% in a range, and count them. Then put the result in cell Z58. Range is I51,L51,O51,W51,Z51. i.e if all cells are 90% then put value of 5 in cell Z58. Here is code i have that isnt working:

View 3 Replies View Related

Macro To Compare Two Columns And Identify Duplicates?

Jul 10, 2013

So here I have two columns Column 1 with repetitive values of some 10000 records Column 2 with unique values of 100 records I want to compare Column 1 and Column 2, identify the values in Column 1 that match with Column 2 and highlight them. Conditional formatting for duplicate values doesnt work because Column 1 has repetitive values.

View 6 Replies View Related

Identify Object That Triggered Macro Code

Feb 27, 2008

I need to identify the object that is triggering the current running macro. For example, i have 4 buttons say button 1 to 4 that all do almost the same thing. I have written 4 different macro for all 4 buttons but i want to simplify my code so that i can have a better leaner code by only using 1 macro for all 4 buttons. simply put is there a way to say identify which button/shape i pressed:

If "identity of button pressed" = "Button1" Then
execute some code
End If

View 3 Replies View Related

Identify Formula Errors Macro Code

Mar 6, 2008

i would like an if macro to pick up if cell dest (i have used a case to define this cell) contains an error or more imoprtantly #REF! then change the offending cells to 0 and put up a message box to put "Check XTA". i have found some that i think may work but i didnt understand them (they had function in them :smask so i couldnt put them there a way to put them in with out functions or could someone point me in the right direction.

View 4 Replies View Related

Macro To Find Correct Data In Cells That Have Multiple Values

Jan 27, 2014

Script Example.png (Picture)
Script Example.xlsx (Example Workbook)

I have a report that I pull that I pull fairly often that is in this format and shows which footage of products each store is getting (out of over 1800 stores)!

Above is the format that it comes back as. And here is a spreadsheet that shows what steps I take to find correct values in detail.

So each FTG has an ID# and Desc. The ID is in text format and each ID is seperated with a comma, no space. Description also. Date is seperate by a space and comma. Stores change footages a lot so I want to find out which footage is effective today (1/27/2014) For ex: Store 63 would have the 5ft effective right now because we are between 5/23/08 and 5/22/14. So each ID# and Ftg Description is in the same order as Date.

When I have hundreds of stores, it is difficult to go through and get each one (even with the way I've been doing it.) But my ultimate goal is to create a macro to put only the current footage ID#, Desc, and Date in Columns C,D,and E. I'm not sure even where to start with doing a macro.

I usually just find the store with most ftgs, count them, insert that many rows after ID and Description columns, then do a text to columns (comma, delimited), sort by 2nd date column (so they all come up top) and then manually go through them and delete unneeded columns once I have them all.

View 7 Replies View Related

Ensure Macro Code Applies To Correct Sheet & Workbook

Mar 21, 2008

I am trying to write some code that is linked to a Command button. The code in the command button is in my workbook called "MF Consolidated ACTUAL DAILY REPORT - Dev.xls" but then I have another workbook called "MF BANK EXPOSURE SUMMARY.xls" that I want to do some work with - namely delete blank columns and it is here that I am having the problem.

My problem is this: my code module is contained in my project "MF Consolidated ACTUAL DAILY REPORT - Dev.xls" and the columns that I want deleted are in the "MF BANK EXPOSURE SUMMARY.xls". Now even though I believe I have activated the "MF BANK EXPOSURE SUMMARY.xls" workbook the action, that of deleting the blank columns is performed on the "MF Consolidated ACTUAL DAILY REPORT - Dev.xls" workbook. Why?? Here is the code that I am using:

Sub Commandbutton()
Workbooks("MF Consolidated ACTUAL DAILY REPORT - Dev.xls").Worksheets _
("Seg and Non Seg Bank Summary"). Range("I1") = Application.InputBox("PLEASE ENTER REPORT DATE IN THE DD/MM/YYYY FORMAT")

Workbooks("MF BANK EXPOSURE SUMMARY.xls"). Sheets("Seg and Non Seg").Activate
Dim iCol As Integer
Dim Isheet As Integer
With ActiveSheet.UsedRange................

View 3 Replies View Related

Copyrights 2005-15, All rights reserved