I have plotted a chart through VBA and I am appending some information to certain data labels. This appended part is being turned a different color depending on if a corresponding value is less than or greater than 0.
For i = 1 To cht.SeriesCollection(1).DataLabels.Count
If ws.Range("C" & i + 1).Value < 0 Then[code]....
In stepping through the code, I notice that it works until the color switches twice. So for instance, if the first 3 points are below 0, it turns the appended part of the data label red. Then the next point is above 0 and it turns it green. Then the next point is below 0, and at this point it turns the appended part of EVERY data label red (overwriting the previous green one). It keeps going like this until all of the data labels are either red or green, depending on whatever the last value is as it just keeps overwriting.
I have a document needed to be printed with some pages in the middle in landscape page type, the rest in portrait. If using Word it would be easier, but in Excel I cant find the section break to chage page setup separately. Is there anyway to do it. Currently I'm printing the document separately in portrait and then landscape with some page break added and page number modified. However it's quite troublesome and easy to make mistake.
I have a spreadsheet with 2 worksheets. On the first "active parts" I have a list of active part numbers and on the second "All Parts" I have all of the parts available.
I want to compare every part in the All Parts worksheet to see if the part number exists on the Active Parts sheet - if it's there, I would like it to return the value "Active" in column B in All Parts. I have a formula in column B in All Parts that seems to work for the first few, but as soon as it finds one that is active, the rest of the cells below all return "Active".
I have an API, which inputs real-time stock data into an excel book. Does anyone know how to make the Last Price cell change coloer (Greem=up, Red=donw) depending on whether the price moves up or down, relative to the last price?
ie, over the course of a minute a stock may price at 35.00 => 35.01 (cell turns green) => 35.00 (cell goes red) => 34.95 (cell stays red) => 34.97 (cell goes green).
VBA, conditional formatting, or any other means of doing this is perfectly acceptable.
I've have two cell with data as below: CELL1: X1, X2, X5, X7, X8, X12 CELL2: X2, X5, X12
My question: 1. using macro to identify different data in the cell using color (for same data will be blue and different data will be red). 2. How to count the word in the cell (sample CELL1: after count will become 6 words)
I need this chart to show 3 bar colors based upon values from b5:b14 (data column). This chart is based upon the last 10 draws, so since there are 3 positions, the hit frequency expectancy would be (10 draws/3 positions = 3.33 rounded to 3). So now I would like my bar graph colors RED for any values above "3" in b5:b14 (data column), GREEN for any values equal to "3" in b5:b14 (data column) and BLUE for any values below "3" in b5:b14 (data column).
My current project involves sorting a spreadsheet, selecting specific qualifying data from the sheet, storing it into a variable, the pasting the individual values from the list into individual cells on a different sheet within the same workbook. Here is the code I have so far...
Code: Sub Test() '' freeze screen updating to remain on main worksheet Application.ScreenUpdating = False '' move to Avaliable worksheet [Code] ..
When this code runs the first item in the list pastes into Sheet10 A1, but no other values from the list are placed into Sheet10. Previous to this I had been using a variation of this code to push the list into a combobox list within a userform. In that case instead of
Code: ThisWorkbook.Worksheets("Sheet10").Range("A1") = x
Code: Combobox1.list = x
And this worked perfectly; creating a list within the combobox (in fact I can use this modification to interrogate my code to determine if the list is being properly generated, and it is).
I have two userforms with a label which displays CompetitorID. I want to transfer content (displayvalue) from UF1.label to UF2.Label. I know labels don't have a value property but want to simply know if it can be done as presently I'm getting run time error 380, can't set property value.
VB : HeadEntryForm.lbCompID = Me.lbCompID ' trf selected competitor ID to ID field on HeadEntryForm
I have a spreadsheet with a customers information and various parts we make for them. I need to be able to take this information and incorporate it into a label format. I need something quick and easy as there can be 150 parts per customer
I noticed that when I click on a cell in my Pivot Table a new worksheet pops up with the requested information (essentially a filtered version of my data source depending on what cell I clicked) is there a way for that information to appear on the same worksheet as my Pivot Table? And if so can I also edit what parts of the data source appear?
I have sheets with names of people in columns....some married...some not. When they are married, here's a sample format...
Jones, Donald T | Baker, Sarah Jane | Jones, Sarah Jane | Smith, Sarah J | Jones, Sarah Jane Smith
In this example, I would like to be able to determine which of the Sarah's belongs to Donald w/o having to visually look at each record ( 100,000's of records). (FYI: the names for Sarah would/could be her Maiden Name and possibly a name or two from a former marriage). What I need to be able to do is match and extract the names of Jones, Donald T and Jones, Sarah Jane and Jones, Sarah Jane Smith and eliminate Smith, Sarah J and Baker, Sarah Jane.
In my example, Donald is in the first column, but can be in any column on a row so the name positions are random across the columns. However, the format for each column is then same...Last Name, First Name Middle Name(or Initial) with a comma always after the last name in each column. The length of the last name also varies.
VBA or Formula that will search the cells in the columns of each row and return the names (complete contents of the cells with matching last names) that have a matching last name for that row.
I have a userform in Excel and I would like to have a label calculate from the sum of 3 different labels. I have tried a few ways of which none worked.
This is what I currently have. This returns $0.00 in the label value but does not calculate...
Code: Public Sub TotalCACost() If TextBox12.Value > "" Then Label685.Caption = ""
The reason that I have it as a public sub is that I am calling it to Private Sub extBox12_Change() as well as a couple of other textboxes so that when ever TextBox12 or the other textBoxes gets changed, the value will recalculate. The "other textBoxes" change the values of label443, 444, 445, 385, 386, 387 etc..
I have a spreadsheet that I have variable data in and I want to transfer specific parts of the workbook into a Word doc.
Not a problem with the Excel part, I can select each and every cell that I want, copy them and then...
Recording a macro hasn't done the trick as the code I have only copies and doesn't paste. I know I can edit the code to open Word but the problem is that when in Word, the data needs to go to very specific places, some of it goes in the header, most goes in the main body, I can't see how this could be done as there are no cell refs as in Excel!
is it possible to paste to say halfway in a sentence, in a macro?
I created a userform where if a value from cell x is true then the label caption changes to value in cell z. While everything works fine, the label caption does not seem to appear in my userform until i click on the label. Is there anyway that it can appear automatically once the userform opens?
Also example of my code is:
Private Sub EventDateResult_Click () If Range("A5") = "1" Then Me.EventDateResult.Caption = Range("N4") End If End Sub
I have a plot that shows the position of a drifting buoy in the ocean. I have created a second series that is just the most recent position of that buoy. Everyday, using VBA, I update the chart 2nd series to point to the location of the new lat and long. For this second series, which is only one point, I have data labels turned on. I replace the data label text with the date and time of that latest position. Here is my problem. I can not find a way to format the date. No matter what I try, it has the format mm/dd/yyyy hh:mm AM/PM. I really just want it to be a 24 hour clock (mm/dd/yy hhmm).
I have tried forcing the format of the variable date_of_latest_pos, I have tried changing the cell format that contains the actual date and time...
I have a spreadsheet with rows of data. Presently, there are three pairs of columns. The first column in each pair has a label (E, F, R). The second column represents the number assigned to the label (e.g. 30, 40, 60, 70). The labels may appear in the first column of any of the three pairs. I would like to reorganize the data in three columns, which are headed, E, F, R, with the associated number underneath the heading. I have attached a sample spreadsheet showing the desired results.
trying to update pie charts via vba. This is working fine, but I have a problem with the data labels. The number of categories can change each time the macro / data is run. This is as it will be for different customers that takle different products.
When the data labels are remapped, those with a small percentage end up placed untop of one another. I have already played with grouping these small percentage together into an 'Other' Category which works fine, but I know I will be asked to split this out.
Is it possible to add a condition that states 'DATA LABELS MUST NOT OVERLAP' - or is there some way of working around this to the same effect...
I have a spreadsheet that has about 40 pivot tables that use label filters for filtering HH:MM and "greater than" selection. When I do a refresh, I have to go back and reset the label filters. Is there any way to not have to re-do every label filter after refresh? I have looked at all the settings and didn't see anything in there that looked like it would work. Maybe VBA?
I have one series on my chart set as column type with data value labels. I have another series as line type to create a benchmark line across the chart. The chart is interactive where user can select 1 of 20 units. On some of the units, the labels are overlapping the line type chart and causing a poor display
I have a list of data which i need to send to individuals. I can sort the data by person's name.
I need to send each individual person their own data. Instead of copying and pasting each person's data into a new tab for everyone, is there a quick way in excel that for each change in person's name (Column A), that it creates a new tab with all the data?
I have a workbook populated with values in 3 columns. The values of the second column group rows into larger segments. I want to pull one row for each different value onto a different sheet.
example: 1. apple 2. apple 3. apple 4. apple
How do I only pull one row of apples onto another sheet without copying by hand? I have attached an live example. I want to pull one row for each classification (column 2) named on the sheet without copy/pasting each one.
trying to insert rows into certain sections of a large data set.
Currently, there are over 25k rows of data and I need to insert individual blank rows between certain lines. The process is too daunting to try and do it individually (CTRL+Click row number) so I need to find a way to do it based on a specific number in one of the columns.
I can insert individual rows after filtering the data to only show the rows that need blank sets under them
I've included a sample to illustrate my point. There needs to be a blank row before every row with a "1" in the "count" column.