How To Exclude Certain Data Points
I'm running a query of 30 and 60 days worth of data but I don't want certain dates to be included in the queries. How do I exclude certain dates and at the same time pull in day 31 to include this in my 30 day high or average etc.?
I want to exclude 1/15 because it is a holiday and it just repeats the data from 1/12. So I want it to pull in the data for 1/12 if I were doing a 5 day query. As I said before I need to do a MAX, MIN, AVERAGE and STDEV of 30 and 60 days but my formulas are skewed because of the holidays.
View Complete Thread with Replies
Related Forum Messages:
Inputbox To Exclude Data
I need to have an inputbox for users to enter multiple store numbers. What I need to do is actually filter out the store numbers that was entered into the inputbox
my code so far is:
'Inputbox to filter out new stores
Newstore = InputBox("Enter New Store Numbers seperated by a space", "Enter New Stores", "119 120")
x = Split(Newstore, " ")
For i = 0 To UBound(x)
Range("A1").CurrentRegion.AutoFilter Field:=2, Criteria1:=Array(x) _
Exclude Non Mature Data
I have data that I calculate by month and at the bottom I calculate a weighted average. However, I want to exclude the last two months (data points) because they are not mature.
So every month when I update the spreadsheet, it would be the two newest data points to exclude.
Exclude Unwanted Data After Macro Filter
I have a sheet for addresses (Column 1 = Name, Column 2 = Address line 1, Column 3 = City, Column 4 = Postcode) and I run a macro that Filters that data based on the the city to different Tabs. This works fine except that sometimes, once the data is filtered I will find one or two addresses on my new filtered sheets that I really wanted to exclude. As my main address Tab information changes regularly, Ideally, I would like to see the Item on the City filtersheet, Double click it, and this would have the effect of deleting it from the City filtersheet but also copying it to an "Exclusions" Sheet which I could use before I run my normal filter macro to filter out these bad addresses.
Average Dynamic Data But Exclude Zeros
I use a SQL query to export a subset of data from our server. After manipulating the received data I need to Average one column that has been sorted into a number of blocks consisting of variable numbers of rows and post the result to the ajacent cell. I have tried the Countif worksheet function but am unable to resove the syntax problem.
Dim First_Row As Long
Dim Last_Row As Long
Dim iTotalRows As Long
Dim iCount As Long
iTotalRows = Range("A65536").End(xlUp).Row
First_Row = 2
Do While Last_Row < iTotalRows - 1
Last_Row = ActiveSheet.Range("j" & First_Row).End(xlDown).Row
iCount = Application.WorksheetFunction.CountIf(Range("J" & First_Row), ("J " & Last_Row), ">0")
ActiveSheet.Range("K" & Last_Row + 1).Formula = "=Sum(J" & First_Row & ":J" & Last_Row & ")/iCount"
First_Row = Last_Row + 2
Color Chart Data Points By Cell Values Of Non-Source Data
I have a bar chart that was made from table 1 which has the value in it. I have another table, table 2 that has the name corresponding to the value in table 1. I want to color data points in a bar chart with a different color for each name I have in table 2. I also want to give a data label in the data points with the value I have in table 2 instead of the original data label from table 1. Is it possible to do it?
Data Validation To Exclude Letters But Allow Numbers Beginning With Zeros
I am using Excel 07 with Vista, and creating a spreadsheet in which users will be inputting a record into every row.
There is a row that requires a number to be entered, where some of the numbers will begin with 0 or 00 or even 0000. I want to make sure no-one incorrectly enters a letter, however with data validation set to whole numbers, it formats the cell to change an entry of "005667" into just "5667". There is no set length for the field.
The only way to have "005667" is the change the column to text, but then obviously that defeats the whole purpose!
Trend Data Points
What I have is a column (column A) that only has two data entries at any one time.
I need column B to fill in the trend of those two data points.
My problem is I don't know how to deal with the cells that say #N/A. Which is every cell other than the two cells with data.
If I replace the #N/As with say 1, then it messes up the trend data points.
It seems like I need to be using the trend command, but any solution would be welcome.
Hiding Data Points
I have created a series of charts in excel and the data sources for them are located on a hidden sheet. I need to keep all the charts active as I have set up macros that enable a viewer to automatically change the chart with a click of a button. However the data behind these charts is confidential and I cannot let the viewer have access to the individual data points.
My issue is that when you 'hover' your mouse over the lines on the charts, the various data points can be seen
Is there a way to make these data points hidden when you hover your mouse over the chart but at the same time keep the source data active behind the chart?
Graph Min And Max Data Points
I need to map the names of the companies on the x axis (ANF, AEO, ARO, PSUN) and 5% to 30% on the y axis. Plotted for each company should be the min and max. So two points for each company. How can I plot this data. Underlying data as follows:
Colour Chart Data Points
How do i conditionally colour chart data points. This is an example of my data from which the chart is created from.
Salesman A 10
Salesman B 10
US Total 20
Salesman C 20
Salesman D 10
Philipines Total 30
When the chart is created, i would like the country total data points to be in orange while the rest of the data points should remain in white. I tried this code and it returned me an error.
ActiveChart.SeriesCollection("Average of Margin").Points("ID Total").Select
.ColorIndex = 36
.Pattern = xlSolid
I also tried the online F1 help it told me to use Points(Index). However i do not want to refer to the ponint with an index as the number of salesman or country could change. Therefore changing the index points.
Line Chart: How To Ignore Zero Value Data Points
I have the following chart that displays average speed for my bike rides (Green line). The problem is that I don't want the line going to points with no value or zero value. So, the first month would just be the point then, when I enter in an avg speed in Feb then the line would connect to Feb. Is this possible?
Formating Specific Data Points In Chart
I have a time series chart ( dates on x axis , with the data values on y axis ). It is a line chart. So column A has the dates, and column B has the values. Both have length 100. Now, column C can be considered to be the "flag" column. If a cell in Column C has the flag set to true , then the corresponding date/data values in the chart needs to be highlighted or formatted differently
I tried playing around with conditional formatting of x-axis but could not make any progress. Do I need to create a new data series with the C column?
Also given that there are 100 date values, I dont want all x-axis points to be listed on the chart. I guess excel by default shows the date points as the user increases/decreases size. But I dont want the specifically formatted date points to be skipped .
Align X Y Data Points On Combination Chart
Following my bosses recent charting attempts involving multicoloured backgrounds, graduated bars, textured boxes, mis-matched fonts etc, etc, which frankly showed no information whatever, I was asked to simplify them.
I did so, as in the two attachments, but the response is now along the lines of "well, yes, but they aren't very exciting, are they?"
Data Labels Points In Scatter Plot
I am attaching the Excel File along with this mail. In chart there is data points have been mentioned in scatter plot like (38,15 etc) Instead of these points I want the names that I have mentioned in column A2:A9. I used to make lots of charts related to this and it is very diffilcult for me to manually punch all these names and most importantly the thing is that I cant download the software available on http://www.appspro.com due to some issues can you give me the VBA code for this which will automatically paste these names only I have to change is the data range and its very urgent................ASAP
Show Values Of Charts Data Points
I've been working on this chart for a while and can't seem to get my x and y axis as well as my series corrected. I have time and distance but since my distances are small I cant seem to make sense on how best to depict my data. Right now it is shown as data points but would love to show value.
Conditional Format Chart Data Series Points
Background: I have a Chart sheet with a combination bar/line chart on it. Data is coming from a "datasheet". There is a combo box on the chart sheet that allows you to choose a specific office whose data you want to view. Pick an office from the dropdown and the chart changes. The data is a count of closed cases by month. The data sheet shows 22 Offices with their monthly data, along with entries for each month of the Upper Control Point, Lower Control Point and Mean based on the nationwide data for that month.
The chart itself uses bars to show the office's case count per month, and I've incorporated 3 additional data series to plot the UCP, LCP and Mean as lines for each month.
I'd like to change the color of the bars to be Blue, Green or Red depending on where they fall in the 3 lines. I sort of have it working, but I'm stuck.
The code below grabs the value of each series point and compares it to the 3 control points and does change the colors. I've figured out how to use the If, next to change from one series point to the next, but cannot figure out how to loop through each of the control points. As it stands now, it looks only at the first month's control point and uses that for each successive month.
I hope this is clear and I've tried to keep it as short as possible while still providing enough information.
' chartbarformat Macro
' Macro recorded 5/15/2008 by vacoyoungd
Dim x As Integer
Dim val As Variant
Dim AveragePending As Range
Dim LowerPending As Range
Dim UpperPending As Range
Duplicate Entries For Single Data Points Sets
I am using old macro code in excel written several years ago. I am trying to educate myself to update and improve the macros I am using but not making much progress. This macro is used to record data from a DDE link to a Data Acquisition System. The D-AQ system sends the data points to r5c3:r5c9 typically. The macro then records the data points in those cells to the next row in sequence on a specific time interval. However, the macro is recording duplicate entries for each set of data points. Sometimes just two, but has been as many as four duplicates. I have a remove duplicates macro to run, after the fact, but preventing them from occurring in the first place is the goal. I included the application.wait method at 10 second intervals after the application .OnTime method, but it isn't preventing the duplicates.
Dim delta_time As Date
Dim Count As Integer
Dim n_rows As Integer
Dim start_row As Integer
Dim col_mov As Integer
start_row = 7
Count = 0
n_rows = Worksheets("sheet1").Cells(1, 2).Value
delta_time = Worksheets("sheet1").Cells(2, 2).Value
Application.OnTime Now + delta_time, "get_data"
Rem Worksheets("sheet1").Buttons.Add 275, 0, 72, 36
Worksheets("sheet1").Buttons.Caption = "STOP"
Worksheets("sheet1").Buttons.OnAction = "Halt"
Color Code Data Points On A Scatter Chart (2007)
Does anyone know if there's a way to color code points on a scatter chart based on their values in a "3rd dimension" (i.e. other than the 2 dimensions represented by the chart axes).
You might imagine a scatter chart that plots transactions by price (y) and units purchased (x).
In that scenario, it might also be nice to color code each point by the region that made the sale.
The only way I know to do this is to manually create separate columns of data for each region, so that each region can be plotted on the scatter chart as a separate data series.
But since I'd like to experiment with several color coding alternatives, I'm wondering if there isn't a simpler way...
For instance, Rob Bovey's "XY Chart Labeler" can add data point labels to a scatter chart...
Is there, perhaps, another add-in that might enable color coding of data points based on a 3rd set of values?
Color Chart Data Points By Cell Color
if it actually possible to colour data points depending on the colour of the cell of the data it refers to? if not is it possible to colour it any other way
i have uneven amounts of data for weach month but still want the months to be displayed, this is the best way i can think of of doing this
Sum Column Exclude Duplicates
I've got data for different regions of our company. For this example, what I need to do is count the number of jobs in the "South Atlantic" region (Column T) that are NOT "Wal-Mart Stores, Inc" jobs. In order to do this, I put a "1" in Column F so that the formula would have something to sum:
=SUMPRODUCT(--(T2:T1079="SOUTH ATLANTIC"),--(H2:H1079<>"WAL-MART STORES, INC"),(F2:F1079))
The problem is that some job numbers, which are located in Column G, are duplicated. As a result, this number is higher than it should be.
So what I need to do is only count each job number once. How do I do that? Is there a way to modify the existing formula? Or do I need something completely different?
Exclude Empty Cells
I have this calculation which works fine if all cells have a value. But it will happen that cells in the range are empty.
=SUMPRODUCT(--(1*LEFT('Courses input'!C4:D6,1)-C3<=0), --(1*MID('Courses input'!C4:D6,3,1)>=2))/E3
What can i do to exclude empty cells in the range from calculation?
Conditional Formatting Exclude 0?
I want to conditionally format the highest and lowest number in a range of numbers in a single column (Column C). The numbers in Column C are created by a formula that simply adds the data in the two cells in the same row of Columns A & B.
Numbers are entered into columns A & B daily. The column C formula has been filled into enough rows to complete the entire year. Since future days do not have numbers filled in for Columns A & B, Column C for those days results in a sum of 0.
I have set up conditional formatting for Column C so the cell of the highest number in filled in green. I want to conditionally format Column C so the cell with the lowest number is filled red, but it automatically fills all the cells for future days in Column C in red because the sum displayed there is 0.
Is there a way to exclude the 0 sum cells? The date is filled in as simple text, rather than formatted as a day. Is that the answer?
BeforeDoubleClick Exclude Range
I have the following code which toggles the value of cells by double clicking on them. I need to exclude certain ranges of cells though. I tried password protecting the sheet, but that haults the code. Is there a way to exclude the cells or exit sub if the targeted cell was in the range of Rows("10:10") or Columns("A:B") for example?
Ask Macro To Exclude Sheet By Name?
I have a workbook event where the macro inserts the username and date into the comments of the cell that has been edited.. However I would like it to exclude the 'Index' worksheet that has its own macro for indexing all the sheets in the workbook. As every time the sheet is clicked and the macro updates the sheet names all the cells comment.
Macro To Exclude 1 Sheet In WKB
I have a macro code (attached below) which i am using to do some conditional formatting for all my worksheets in a workbook. I would like this macro to skip 1st 2 sheets in this workbook.
Can some1 kindly edit my following code so that macro does not runs on 1st 2 sheets namely "Sheet1" & "Sheet2" and continue running for all remaining.
Exclude Rows Containing ZEROS In Column L
I analyze logged data that often contain ZEROS in column L, always starting on row 35. That's bad data. The first row with good data contains the number 700 in column L, but this row number is unpredictable.
How to make a VBA code to exclude the rows that contain the number 0 in column L, searching between cell L35 (including) all the way to the first row containing the number 700?
I need to limit the range to be scanned for ZEROS because sometimes there are valid ZEROS in column L, but those would be in rows below the rows contain 700 in column L.
Exclude Zeros From Array Formula
I have 16 columns in a single row that I am trying to apply to an array formula. That works, but I need to exclude all cells with the number "0" from the array range. I think I can do this myself in VBA but I don't want to run a macro every time something changes. Is it possible to do this in excel?
It is possible that A1:A4 is a non-zero range and A12:16 may be a non-zero range. (Zeros will always be grouped in 4s)
Max Number Of A Spreadsheet But Exclude 3 Numbers
i have a worksheet filled with numbers in each cell (the worksheet might have a total of 150 rows and 150 columns of numbers).
the numbers typically range from 1-3 or 1-9 or 1-150.
however, there are also multiple 997, 998, and 999 numbers in the cells.
i need to identify the highest number in the worksheet that is not 997, 998, or 999.
Exclude Outliers In Average Calculation
Is there a good way of excluding an outlier in an average calculation. In the example below will I exclude 1000 from the average-calculation.
The way to decide excluding-values can either be a percent based on the range or everything that is a higher than a user defined value. It can also be more than one outlier.
A user defined function is OK with me, if it is impossible to use the built-in functions.
Exclude Weekends In Date Counting
I have been trying to count dates in my spreadsheet. The dates are supposed to go back in time (what they do). But I want them to jump over the weekends' dates instead of landing on them.
What I have is Start Date, Req'd Qty, Days it takes to make, Date it is required to start production (which I have a problem with).
1 26-Nov [Thursday]
4 'Problem' I used for this cell that formula: =if(A2>0,A1-A3,"") , as I don't want it to show anything if there is no requirements.
It comes back with 21-Nov which is Saturday when I want it to come back with 19-Nov (Thursday) as we only have 5 working days in a week.
Sumproduct Formula - How Do I Exclude Values
I've used the sumproduct formula very sucessfully in a workbook. The workbook is used to monitor discrepancies routed to other departments. Column U has the status of the discrepancy (Open, Closed, Cancelled etc). The below formula returns the number of discrepancies raised to a particular department. Now I need to tweak the formula to exclude values "Cancelled" found in range $U$119:$U:417.
Exclude Weekends And Holidays From A Formula.
I have been asked to create a worksheet to calculate the percentage of the utilisation of a number of loan cars per month. Each of the cars may be used on each and every day of the week but the percentage utilisation is to be calculated on working days only. However it is essential to record the name of the driver of the car at weekends and holidays. Column A is populated with the dates of the month. Colum B is populated with the relative days of the week. In column C and subsequent columns I record the name of the driver of a particular car registration. Is there any way that I can count the number of drivers of each car on working days only and not weekends or bank holidays?
Exclude Sheets From Hyperlink Index
I am currently using the VB code from an older post in here.
Index Worksheet Plus
The problem I got is that i do NOT want all sheets to pop up in the index page. I got several sheets that I do want to exclude from the index listing. The sheets I want to exclude is not hidden.
Is there any way to exclude sheets from the index ?
Exclude Minimum Two Values In Average
I have looked on here and I can find the minimum value in my range but what I am trying to do is find the minumum two values. Or rather, i want to find the average of the remaining values.
If the lowest value happens THREE OR MORE times, i still only want to exclude two of them. Same thing goes if the second lowest happens more than once, i only want to exclude at most two values from the avg.
currently, i have 12 values in my list.
list --> one in each cell going across
25, 50, 87, 56, 99, 80, 81, 82, 50, 100, 98, 99
i have the answer as 83.2 doing it by hand. the 25 and one of the 50s would be dropped and the rest would be averaged.
Exclude Hidden Cells In Average
I have a large data table that has autofilters on the headings.
I also have a "Data Summary" Sheet in which I would like to get a conditional average.
Here is my *working* array formula:
=AVERAGE(IF('Data Table'!$C$10:$C$65536=A2,'Data Table'!$BP$10:$BP$65536))
The problem is, it averages all cell values (conditional upon the C column's cell being equal to A2 of course), whereas I only want to average the VISIBLE cells that match the condition.
I have tried using a little VBA with:
Function Vis(Rin As Range) As Range
'Returns the subset of Rin that is visible
Dim Cell As Range
Set Vis = Nothing
For Each Cell In Rin
If Not (Cell.EntireRow.Hidden Or Cell.EntireColumn.Hidden) Then
If Vis Is Nothing Then
Set Vis = Cell
Set Vis = Union(Vis, Cell)
and then trying the formula:
=AVERAGE(IF(Vis('Data Table'!$C$10:$C$65536)=A2,Vis('Data Table'!$BP$10:$BP$65536)))
but it does not work.
Exclude Files In List From Filesearch
I am using the following to compile data into a master workbook
.LookIn = SrchDir
.SearchSubFolders = False
.FileType = msoFileTypeExcelWorkbooks
.LastModified = msoLastModifiedAnyTime
.Filename = "*.xls"
If .Execute > 0 Then
For Each vaFileName In .FoundFiles
' If vaFileName = Exclude Then GoTo n ' maybe something like this ?
and then processing each file, and adding it to the master. This is run every time a user opens the workbook. The number of workbooks in this folder is fairly large and more are added every day. What I would like to do is, compile a list of file names that have already been processed (I can handle that part) and then exclude them the next time the master book compiles from that folder. so if the master was run September 16th, all the data up to that point is already in the master and a list of those files is on a sheet in the book, now if the book is opened again on October 1st, it will look at the list first and only add the data from Sept. 17th through Oct 1st.
The file names I'm dealing with are named by date ie: 9-16-06.xls. The folder they're in is on a server so I can't just kill the directory after processing so that only new files are there, other people may need access to them. I think this may be handled at the "If Execute > 0" part of the code but am not adept enough to know how to do it. Possibly set "Execute" as a variant and have it cycle through the list