Chart Macro Multiple Times

Jul 13, 2007

I have a problem with multiple charts in one sheet. The problem is really weird because when i add the charts to the sheet where all the values are then there is no problem, but when i set the position of the charts to another sheet and specific position it gives me an error

Here is my sub for making the chart:

Sub chartFormat(FChart As Chart, Hø As Integer, Bre As Integer)
With FChart
.ChartType = xlLine
With .Parent
.Height = Hø
.Width = Bre
End With
With .SeriesCollection(1) ' THIS IS WHERE THE ERROR OCCURS
.Border.ColorIndex = 10
.Border.Weight = xlThick
End With
With .Axes(xlCategory)
With .TickLabels
.Alignment = xlCenter
.ReadingOrder = xlContext
.Orientation = xlUpward
End With
End With

are the sheets where I wanna place the chart and where I get the data.

Now if I change profVis to sag all places then it works fine and it places all the charts and make them perfect. But when profVis is there, it makes and error 1004 :

Method 'SeriesCollection' of object '_Chart' failed.

But the error first occurs after the first 2 chart have been made. I've tried switching them, so the last chart becomes the second, and it can make it. It seems as if there is a limit of 2 chart?

View 5 Replies


ADVERTISEMENT

Macros Not Visible: End User To Be Able To Run The Report Multiple Times By Choosing The Name Of The Macro From The Macro Menu

Jul 16, 2007

I have written two VBA programs around the same time. Both run on open and pull external data and create graphs. My problem is that I want the end user to be able to run the report multiple times by choosing the name of the macro from the Excel macro menu (i.e. Tools>Macro>Macros) but only one of the workbook macros shows up on the menu. why the other macro is not visible on this menu???

View 2 Replies View Related

Filter Range Multiple Times In Macro Code

Jun 11, 2008

I've taken data from a fixed-length text file and the records are identified using the first two characters on each line of the text file. I've managed to identify these in each row with other bits of code so that was fine.

Now, I have 56 string variables (identifying my record types), which I'm assigning into an array. Then, I want to go through each variable in the array, performing the same action by way of a For Next Loop where, by taking this particular RecIDNo (see my code) string variable I will get the code to copy/paste the data into the relevant worksheet (where later on I will apply a text to columns using another array). But first, this set must work before I can do that! To avoid confusion, note that the record types i.e. 01 through to 56, will be filtered, then copied into the corresponding worksheet with the same number.

The problem I'm getting is the autofilter I'm applying, then the array I'm trying to reference (to avoid repetitive coding!) doesn't work as the code doesn't compile (I've not worked a lot with Arrays but I'm learning all the time!)

Option Base 1
Sub test()
'The array is declared here:
Dim RecIDNo(56) As String
'The arrays are assigned the string variables below:
RecIDNo(1) = "01"
....
RecIDNo(56) = "56"
'This worksheet contains my data:
Sheets("DATA").Select

For RecIDNo(1 To 56) '<--I THINK THIS IS WHERE I'M GOING WRONG!!
'Filter and select arrays:................

View 2 Replies View Related

Macro Loop – Find Specific Times, Extract Date, Average Values Of Times

Feb 23, 2010

In my workbook I have about 20 sheets (less in the attached sample), and on most sheets I’d like to query data for each day and find an average value based on the time and then copy that result into another sheet. I’m not sure if I’ll need 2 macro’s for this or if one can be used.

Here’s a quick description:

Assuming that I am currently in the sheet I want to run the macro, then I will either input “1:45” or “0:45” into a popup box, or I could always simply input the 1:45 or 0:45 in the code itself. I’m flexible

1:45:

If I input 1:45, then I’d like the macro to find the first 1:45 in Column B and the value in the same row in Column F will be used in the calculation. Once 1:45 is located, then the macro moves up to find 22:45 in Column B and the value in the same row in Column F will be used in the calculation.....

View 11 Replies View Related

Create Multiple Chart Macro From Single Sheet

Jan 31, 2014

I have a data set where the rows contain monthly sales data (from January to December) and the columns contain the names of employees (joe, bob, sue, etc.) and a single "group average" column:

I would like to create a chart for each employee showing the employee's monthly sales vs. group average. For example, the first chart would be for joe...

Then the next chart will be for bob and so forth...

View 3 Replies View Related

Odd Chart: Combine Data From Multiple Worksheets And Make A Chart

Mar 26, 2009

I am trying to combine data from multiple worksheets and make a chart. I have about 200 keywords in every worksheet (about 50), and some of them repeat themselves through worksheets and some don't. For every keyword, I have an associated value in the next column that I want to portray over time (each worksheet is for a different period).

So what I need to figure out is how to be able to pick any 10 keywords from the worksheets and put them in a line chart where I can see the associated value for each period for every worksheet so I can compare my keywords' efficiency. The tricky part is that some worksheets do not contain the keyword and other worksheets contain the keyword in a different cell than the previous wsheet.

View 4 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 - Repeat Macro A Specific Number Of Times

Aug 22, 2008

I have created a macro that copies the outcome of a specific calculation (that is driven by random numbers) and pastes it (as values) into a seperate table. It then recalculates the sheet, copies the new outcome and pastes it into the same table at a row beneath the previous one.

However, I would like to be able to determine how many times this loop is repeated (i.e. how many rows of outcomes will be generated) without having to change the macro each time. Is this possible? Maybe by just linking it to a cell where the number of outcomes/repeats is specified.

View 9 Replies View Related

Sum Times During Multiple Intervals?

Mar 18, 2014

I'm trying to determine how much time our agents are spending for their lunch/breaks during 30 minute intervals. Range A8:A200 lists the agent's names, Range B8:B200 lists their lunch/break start times, Range C8:C200 lists their lunch/break end times, and Column E lists the times (8:00, 8:30, 9:00, etc.). If an agent starts their break at 10:57 (Column B) and ends at 11:10 (Column C), the value next to 10:30 (Column E) would have 0:03:00 and the value next to 11:00 would have 0:10:00. But would need to sum all the agents which took a break/lunch between 10:30-11:00, and 11:00-11:30.

View 2 Replies View Related

Calculating Multiple In And Out Times

Apr 10, 2014

I would like to add up multiple time in and time out for my pay sheet.

As you can see, the total hours worked for Weed A is correct, but the Total Hours Worked for Monday is incorrect. The forumla I am currently using is:

=((B12-A12)*24)+((B13-A13)*24)+((B14-A14)*24)

But I would just like the total hours worked for each day to be the actual hours (2.5 hours).

View 2 Replies View Related

Run Code Multiple Times?

Jun 11, 2014

In this workbook Test1.xlsm under column "D" i have Po numbers. Some PO numbers are the same and some aren't. I have a specific code that creates an invoice for a customer when i hit the code however i must select a cell under column "D" in order for the code to create an invoice for the customer on that row. I usually create the invoice for all the customers of the same PO number. Sometimes the amount of invoices i have to create is overwhelming so i was wondering if it's possible that when i select a cell under column "D" that has, let's say, PO number "654" if the code can create an invoice for all customers that have the same PO number of "654"?

View 1 Replies View Related

Moving Nth Row Right And Up Multiple Times?

Apr 3, 2014

I have essentially the same issue with my spreadsheet, but mine is a little easier. I have written code to do the first few steps. I could just use some assistance with the middle. I know my thought on the process is "the long way", but with my experience in VBA I have to keep it simple. Here is my data and then the way I want it to look. I can add a macro to make it pretty afterwards, unless your way is easier (and I understand what is happening). --Oh, I am trying to automate my inventory process.

I have a spreadsheet and i wish to move every nth cell in column A to the initial cells in the row.

example:
Cell A2 moves to E1
Cell A3 moves to F1

Until the end and then select all and sort by column B (this would get rid of blanks and sort everything) before moving to the pretty stage.

How the data comes in. And my Final Goal.

This document is several thousand lines long. I made up the data to protect the weak. There can be duplicate usernames and vendors, but never serial numbers and computer names. Duplicates should be highlighted to be found easily and researched.

I only need to get to the middle picture. After that I can modify with what I come up with.

View 9 Replies View Related

How To Get Values Out Of Column B For A Value In A (multiple Times The Same Value)

Mar 14, 2014

I have a excel sheet with several columns and 2700 numbers in each column. In the first column there is standing from witch quarter to witch quarter of the day the values are (and this for several days in one sheet). I want to take the average of all the first quarters of the day, the average of all the second quarters of a day,.... But if I would do that by just sorting my table on the quarters and than manually make the formullas I would need to give in 800 formules. (way to much)

So I would like to find an easier way to take the average of column B for the valeus were A is "00:00 -> 00:15" (this are avery time 28 numbers in the month february)

In attachement you can find an example of my problem, although it isn't with real values.

View 5 Replies View Related

Matching A Value That Appears Multiple Times

Apr 26, 2006

I have 2 columns with data in them, basically representing a gaussian distribution. Column A has the "X-axis" values and so is uniformly ascending with no duplicates. Column B has the "Y-axis" values and increases up to a maximum and then decreases again (this is data from an instrument and so its not completely smooth but is close). An example is below.

0 4
1 8
2 16
3 27
4 50
5 27
6 16
7 8
8 4

What I would like to do is get the 2 Column A values where the corresponding column B value is half of the max (in the case above, 25 is not available so the closest is 27). I am trying to calculate the difference between these values, so in the example, I would have 5-3. Is there a way to do this?

View 11 Replies View Related

Repeating X Times Among Multiple Cells

May 1, 2007

ok is there a way to have excel fill a certain number of cells with specific data specified X times? For example, the end result would look something like the pic below. The column on the right would change according to the numbers specified in the yellow column.

View 9 Replies View Related

Find And Replace Multiple Times

Nov 9, 2012

I currently have two lists I am working with. One is a big mix of many different names, names which all need to be replaced.

I have another list which has all of these original names included in one column and the names which should replace those names in the column next to it.

Is there a way to go down this list and have excel find and replace every name in the sheet with its corresponding name without having to do it manually over and over?

View 1 Replies View Related

Unprotecting Workbooks Multiple Times

Mar 6, 2008

I've got code that loops through approximately 700 excel files and unprotects the workbook. I have to run this code for five consecutive days, and the issue I'm having is for the files that are unprotected on Day 1, the code still runs for those files the next 4 days.

There may be only 10-15 new files submitted on day 5, but the code still runs through all 700.

View 9 Replies View Related

Using SUMIF And INDIRECT Multiple Times In Same Equation

Dec 9, 2013

I am trying to stream line the recording of time tickets . I would like to create a Summary sheet that shows the amount of hours each worker has done based on that particular day. The trick is I want the summary sheet to be automatically updated when the each individual time ticket sheet is completed. I would also like to be able to drag the formula across a row so I do not have to recreate the equation each time a new time ticket sheet is completed. Each time ticket sheet is its own sheet and is identified by date. Each time ticket ticket sheet is identical and is already created to so all you have to do is click on that the sheet reflecting the date and fill in the information.

This is the equation I have created but keep getting #VALUE!

=SUMIFS((INDIRECT("'"&MONTH(J$8)&"-"&DAY(J$8)&"-"&YEAR(J$8)-2000&"'!$L$11:$L$34")),(INDIRECT("'"&MONTH(J$8)&"-"&DAY(J$8)&"-"&YEAR(J$8)-2000&"'!$B$6")),('Data (2)'!J$8),(INDIRECT("'"&MONTH(J$8)&"-"&DAY(J$8)&"-"&YEAR(J$8)-2000&"'!$C$11:$C$34")),('Data (2)'!$I$9))

The sum_range is Manhours from L11:L34 for each time ticket sheet. The criteria_range1 is date in cell B6 listed on each time ticket sheet, criteria1 is date listed on cell J8 of the summary sheet . The criteria_range2 is names from C11:C34 for each time ticket sheet, criteria2 is name of person on cell I9 of the summary sheet.

Each sheet is labeled as 8-19-13, 8-20-13, 8-21-13, and so on. Summary sheet is labeled as Summary

The table that I am using to record the data on the summary sheet has the date increasing by one day on row 8. The names are vertically listed on column I.

View 1 Replies View Related

Copy And Paste Rows Multiple Times

Mar 20, 2009

Basically on the file below whenever there is data in column "type" I want excel to copy the "name" and "account" next to it. The whole file has about 80,000 rows. Spacing is not always one blank row between accounts. I am using excel 2007.

View 5 Replies View Related

Use Value Multiple Times Before Hiding It In Dropdown List?

May 24, 2013

I used this method to hide previously selected values in a drop down menu. I thought by including that value multiple times in my "employee" list, I could use it multiple times before hiding it. Is there any way to skirt this? I need to use each value three times before it disappears.

View 2 Replies View Related

Adding Multiple Times Together Not Working Correctly

Jun 10, 2013

I have a list a time (HH:MM:SS) that i want to sum together to get the total number of minutes.

It works if I use simply add A2+A3+A4 etc, but not when I use sum(a2:a4).

There are over 2500 lines of data.

Sheet attached : times.xlsx

View 3 Replies View Related

Excel 2010 :: Sorting Multiple Times

Aug 27, 2013

I have a sorting question in Excel 2010. Attached is an example workbook with a simplified version of the situation.

I want to sort a table multiple times. I have a table with part numbers and alphanumeric locations (Row, Shelf, Bay, Slot). I have formulas that divide up the location into 4 separate columns to be able to sort.

The first sort I do is by location, which I can easily achieve. The issue I have is sorting AGAIN by part number, while keeping the original sort somewhat intact. If a part number shows up multiple times (i.e. in two DIFFERENT locations), the Nth instance might show somewhere down the list.

Is there a way to sort my table to where you keep it in location order WHILE accounting for duplicates, which I would want grouped together in location order? Please see attached file : SortExample.xlsx

View 8 Replies View Related

Preventing Off Retrieve Data Multiple Times?

Mar 6, 2014

Current program i use follows these steps:

-Empty cells

-Remove comments

- Fill Headers

- Retrieve Data (From the path Results (a subdirectory))

- Sort on date and time (column D)

My Problem: The programma now used retrieves every file in the subdirectory again and again.
If it has like 100-200 files it takes a very long time.

Is it possible to make a function for this that only retrieves files when the filename is not imported already? (Title is in the D Column)

Wish: a function that retrieves only the required data and skips measuring data thats already there.

View 2 Replies View Related

Hours Worked Based On Multiple IN / OUT Times Per Day

Feb 26, 2013

In a single employee Timesheet spreadsheet:

....................Mon.....Tue.....etc.
In:................6:65.....6:71
Out:............12:07....12:05
In:..............12:62....12:41
Out:............15:66....15:73

Hrs Worked:.....8.46......

How to format the cells in the daily columns and what formula to calculate 'Hrs. Worked'?

View 2 Replies View Related

Copy Range Multiple Times Across Sheets

Mar 31, 2014

I have the following data in one "Project_list" tab:

Project
AAAA
BBBB
CCCC
DDDD

I want to copy this data into another tab "Transpose" in this form:

AAAA
AAAA
AAAA
AAAA
BBBB
BBBB
BBBB
BBBB

[code].....

So basically copying 4 times every row... as simple as that The constraint: I have about 1500+ projects in the project list, but this list can change so i need a statement that copy values 4 times till source tab has empty values. I would like to have in the second column the following serie for each project.

AAAA Q12014
AAAA Q22014
AAAA Q32014
AAAA Q42014

Note- i want to do this in VB not though formulas as i am doing other derivations in macro.

View 4 Replies View Related

Sum Based Upon Cell Color - Multiple Times

Oct 7, 2008

I have a workbook with a tab called "parts list" where there are thousands of parts with prices. I need to sum all of the parts based upon their location within the list. The list is divided with the following headers - Yellow (Assemblies), Gray (Sub-Assemblies) there can be many under a yellow header, and Green (Components) there can be many under a Gray header.

I have been summing the areas manually, and I am hoping for a more automated way of creating the totals by running a macro.

I need to sum (Column K) from Yellow+1 to Yellow-1 and deposit the sum in the starting Yellow row - Column L. This needs to be repeated for as many Yellow Headers as there are in the list. I then need to repeat the process for Gray Headers - Col K, Gray+1 to Gray-1, and put total in starting Gray header, Column L. Once again, there can be many Gray Headers under a Yellow header, and this needs t be repeated throughout the list. I then need to repeat this for the Green Headers - same as above Gray. I am hoping that this can be done by color, but if it's easier, I can sort the list by color and in column M, add an "A" to all Yellow Headers, "S" to all Gray Headers, "C" to all Green Headers, and "E" to represent the end of the component list -

View 10 Replies View Related

Copying Work Sheet Into Multiple Times

Nov 2, 2008

I have one Excell Book with two work sheets. The 1st sheet (Sheet Name : Data ) contains the data... and in the 2nd sheet (Sheet Name : Rekey) i have a specific form in Rekey sheet and some data in Data sheet. Now i have to copy Rekey sheet into multiple times .... with different sheet names... and the sheet name are in Data sheet from cell A2 to end.....

For e.g. in Data Sheet cell A2 contins work1 and cell A3 contains work2 and A4 contains work3..... and so on....

Rekey sheet contains some form....

I need to paste Rekey sheet multiple times with sheet name work1, work2, work3..... and so on....

View 9 Replies View Related

Copying Sheets Multiple Times Using VBA Causes Error

Aug 5, 2006

There is a Microsoft VBA bug currently outstanding where if your VBA replicates a sheet too many times, it throws a run-time error. I read MS' statement that, to get around this problem, what one can do is to save and close the file, and re-open the file once in a while.

Doing this certainly helped, where it used to crash after copying only a few times and now it goes on until 40 ~ 50 times. But it still crashes. Has anybody been able to get around this problem? Currently I am having VBA save, close and re-open the file every 7 or 8 times or so...

View 5 Replies View Related

BeforeUpdate Event Fires Multiple Times

Feb 3, 2008

I wrote some code to validate an inputfield. I want to keep the focus on this field until a correct (numeric) value is inputed. Therefore I use teh beforeUpdate event instead of the afterUpdate event. Some strange things happen (see code below):

1. When I press enter after putting some non-numeric data in the inpBedrag2 field the msgbox is displayed three times in a row. This doesn't happen when the field loses focus by clicking another field (-> msgbox only displays once = correct behaviour)
2. What's really driving me nuts is the fact that the (more or lesse the same sub) works perfectly.

What am I doing wrong? I'm not getting it. Probably I'm doing something very stupid ... but I can't figure it out myself.

View 9 Replies View Related

Replicate Table Format Multiple Times

Feb 29, 2008

I have a single sheet broken into multiple sections of 10 rows (see attached). The first 5 rows of the section are formatted and I need to Insert 5 rows underneath and format them the same. I can't work out how to do this for the different sections (ie: add 5 rows to section 1, then section 2 then 3). These functions will be on separate buttons to use multiple times. I would have used multiple sheets but the project calls for a single sheet representation.

View 4 Replies View Related







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