Removal Of Subsequent Duplicate Values In Time Series Of Data?
May 22, 2014
I'm having some problems with the removal of duplicate values in a time series. The time series consist of stock data for about 10000 firms, but about 3000 of these firms died(delisted) before the end of the sample. The database I used to extract these data, however, does not remove the firm values from the sample, but keeps the last known value of the firm for the remainder of the time. Therefore, I need to remove these duplicate values, but only if they are sequential. Furthermore, normally if you remove duplicate values, excel will delete the cell and shift the data upwards, since it's a time-series I would rather have excel just blanking out the cell instead of removing it.
I've looked at normal solutions, like using the countif functionallity in excel, but this is not feasible because of the size of the worksheet, also, it does remove non-sequential duplicate values as well.
summary:
- Want to remove duplicate values, but only sequential values.( It's possible firm value is the same somewhere in the time period)
- The cells should be blanked out instead of deleted.
View 2 Replies
ADVERTISEMENT
Jan 19, 2012
All i want is to delete duplicate rows or data in query 1 column.......
Query 1Query 2Confidence_0.118_Length_701McdonaldsConfidence_0.118_Length_701Magic moments
Confidence_0.118_Length_701ZamaicanConfidence_0.176_Length_582Urobi
Confidence_0.176_Length_582McdonaldsConfidence_0.176_Length_582Rum
[Code] ...........
View 5 Replies
View Related
Mar 30, 2009
I have a single-column list. The column header is 'ID'... records within this column repeat sometimes (this is ok). I need a worksheet function that will allow me to mark the second, third, or fourth duplicate, but leave the first duplicate alone or unmarked. I have searched the Web and this forum, and came up empty. If this cannot be done with a worksheet function, then VBA is welcome. No ColorIndex.
View 2 Replies
View Related
Feb 16, 2009
I have a worksheet with several columns of data. In Col B are part numbers, in column D are dates. I wish to search through the data and remove all lines with duplicate cells in column B EXCEPT the line which has the latest date in colum D. I should then be left with a sheet that has no duplicate cells in column B and the latest date in column D.
View 9 Replies
View Related
Jun 17, 2013
I have just added two date and time picker controls to my spread sheet to allow the user to select the date range.
They are linked to cells C9 & C10.
The problem is that the formula I using to check whether the first selection pre-dates the second has stopped calculating correctly when using the date and time pricker controls.
The formula is:
=IF(C9>C10,"Error","OK")
I have checked it on the same sheet by just typing the dates in and it works fine...I have tried formatting cells C9 & C10 to short date, general, text, number but it still does not calculate correctly.
View 5 Replies
View Related
Mar 9, 2014
I have a table similar to the table on the left, and I need to convert it to something like what is on the right. Ultimately I will concatenate the numbers in the table on the right too with commas between, so if for some reason it's easier to go straight to that, that's an option.
So in the example below, states will be listed multiple times with a unique number next to it each time. The state may be listed up to say ten times or as little as one. Each time it is listed, it will have a different number next to it. I need to reformat this into one where each state is only listed once, and each possible number is next to it in one row.
20z3fwk.jpg
View 4 Replies
View Related
Dec 21, 2006
I have been browsing here off and on, and have found many excellent answers. I use Excel to process data on time series, as an adjunct to consultancy work on statistical analysis of industrial data . Usually the data has irregular gaps, e.g., daily data might have 2-10 day gaps. If I want to take, say, 7-day averages, SKIPPING OVER gaps longer than 2 days(say), is there an easy way to do this (I don't really know VBA,and it is not worth my time to try and write long code for this, which will eventually be done by some professional programmers)!
View 9 Replies
View Related
Jan 8, 2014
I have A:1 - X365 filled with hourly energy prices for 2013. I need to convert these to a single column - A1:A8760. I have tried writing some code and some macros with no success.
If I were to do it manually 365 times, the macro would look like this:
Copy Row A1:X1
select sheet 2
Paste Special > Transpose (fills A1:A24)
repeat for rows 2-365
Tried using this from a previous post, but it takes A1:A24 then B1:B24 and so on and makes them a single column - so it doesn't work unfortunately.
Sub MakeColumn()
Dim rng As Range
Dim LastRowSrc As Long
Dim LastRowDst As Long
Set rng = Worksheets("Sheet1").Range("A1")
[Code] .....
View 3 Replies
View Related
Jan 23, 2014
I have a series of 12 monthly data values:
1/31/19990.155375
2/28/19990.179262
3/31/19990.179392
4/30/19990.178993
5/31/19990.17128
6/30/19990.139678
7/31/19990.15518
8/31/19990.15536
9/30/19990.17732
10/31/19990.117725
11/30/19990.134171
12/31/19990.149113
and also a series of the 365 days that comprise these 12 months.
I need to populate each of the 365 days within this period (1/1/1999-12/31/1999) with its corresponding value for the month, i.e. 1/21/1999 (and all days in Jan) will take 0.155375 and 5/4/1999 (and all days in May) will take 0.17128.
How I should set out my data and which formulas I need to use?
View 8 Replies
View Related
Jul 25, 2014
What I want to do is take information from a main sheet and pull certain rows (determined based up on the selection made in the delivered to column) and move it to a worksheet that contains information only for that individual entity. Below is the list of headers in my lis of all information
Ticket #DateDelivered ToNet kg WtTonsRunningTotalDaily Total
As I said, depending upon the name in the delivered to, I would like to carry forward the following information only for the specified vendor. For example if we have 3 entries 1 delivered to company a, 1 to company b and 1 to company c, each would carry forward to the respective worksheet for that vendor.
Ticket #DateDelivered ToTons
how I might accomplish this in a usable format for what I am trying to do.
View 2 Replies
View Related
Feb 14, 2009
Un-Skipping the Rank after a duplicate value to get a regular Series!
Col A------Col B------Col C------Col D
Players------Scores------Rank------Answr
SACHIN------186------1------1
DHONI------183------2------2
KAPIL------175------3------3
HAYDEN------175------3------3
SEHWAG------167------5------4
BORDER------158------6------5
RAHUL------152------7------6
LARA------148------8------7
RICKY------148------8------7
KEVIN------142------10------8
BOON------133------11------9
FLINTFF------119------12------10
BOTHAM------112------13------11
I want to prevent the skipping of numbers while using the RANK function which skips the next number when it hits a duplicate value. I want to get the rank as well as not have the next number skipped.
View 4 Replies
View Related
May 31, 2008
I just recently installed Excel 2007 and I would like to know if it's possible to change all data points of a chart at the same time. In Excel 2003, I would normally hold down shift while clicking on each of the data points to make a global change. However, it appears I cannot do that in 2007.
I would like to display each data point's series name. When I go to Layout on the Excel Ribbon, and click on "Data Labels", and click on "More Data Label Options", the actual Y-axis values are shown for each data point. However, I do not want this - I actually only want the Series Name, but when I uncheck "Value" and check "Series Name" instead (under "Label Contains"), it only changes it for one of the series. Is there a better way, instead of going through each and every single series to make this change?
View 4 Replies
View Related
Mar 19, 2009
I have a approx. 70 excel sheets with thousands of entries. Within a single sheet there are some duplicate entries (based on an account number). I find the duplicate entries by using the excel 2007 conditional formating and then sort by color to only show the duplicate entries. There are often hundreds of accounts that are duplicates. Sometimes there are more than 2 identical account duplicates (could be 3,4 or more). In each entry there is a number representing the rating of said account. These numbers differ within the duplicates. Example............
I am trying to find a formula that will choose a "winner" and enter a "W" based on the highest rating within the duplicate entries and then ideally assign an "L" to the loser duplicate account(s). Sometimes there is no rating, other times the rating could be the same in which case any account (does not matter) can be assigned a "W" and the others an "L"
View 3 Replies
View Related
May 6, 2009
Just wondering if any one can help me come up with some code to remove some lap time in my document ....
View 14 Replies
View Related
Jul 13, 2009
i would like to paste multiple duplicate values from unique values. Is there any way to do it in excel??
Ex:
Table 1:
3MG_HUMAN453
3MG_HUMAN44
3MG_HUMAN953
A1AT_HUMAN285
A1AT_HUMAN76
A1AT_HUMAN234
A1AT_HUMAN653
A1CF_HUMAN96
A1CF_HUMAN23
A1CF_HUMAN765
A4_HUMAN 944
A4_HUMAN 23
A4_HUMAN 755
Unique table
3MG_HUMAN100
A1AT_HUMAN78.89
A1CF_HUMAN90
A4_HUMAN 98
I wanted to add new column with these values for table 1 including duplicates. this is sample data and i wanted to replace thousands of this type.
View 7 Replies
View Related
May 24, 2013
I am using the formula below to find the # of hours that staff worked.
=SUMPRODUCT(('Data 1'!$B$2:$B$601=B7)*(LEFT('Data 1'!$A$2:$A$601,2)=LEFT(C7,2))*'Data 1'!$D$2:$D$601)
B7 = Last Name
Left(C7,2) = First 2 Letters of the First Name
$D$2:$D$601 = Hours Worked
My only problem is that some staff show up in the list on "Data 1" twice as they work in 2 separate stores and I am only getting the hours worked at the first store. Is there a way to have excel add the hours for both stores? My data is sorted alphabetically so they will be one above the other.
View 4 Replies
View Related
May 23, 2014
I have a situation where I have about 20000 lines to populate and looking for a quicker alternative. I have duplicate numerical values in the lookup_value. I want the same number to appear for all lookup_value's but there is only one instance of that value on the other sheet I am searching. My table looks like this:
lookup_value
50058459
50058459
50058459
50058459
68594523
68594523
68594523
58965214
Table_array
Column A Column B
50058459 1234
68594523 9876
58965214 3456
I want my output of vlookup to look like this
Column A Column B
50058459 1234
50058459 1234
50058459 1234
50058459 1234
68594523 9876
68594523 9876
68594523 9876
58965214 3456
View 7 Replies
View Related
Aug 19, 2014
I have a worksheet that has 3 duplicate values in a particular column, I need a macros that will highlight two of the duplicates row and then another macro to delete the entire row. The duplicate element are in column R. find attached worksheet.
Copy of OCL 2010 (3).xlsx‎
View 1 Replies
View Related
Jun 12, 2008
I am using the following macro to insert the word "Duplicate" in the first blank column next to a duplicate row. My data is sorted by the first column. Data Example:
12345 a
12345 a DUPLICATE
11111 b
23123 b
Here is the macro I am using and it does not work. It marks the first duplicate it finds then goes into an infinite loop. Any Idea where I went wrong?
Sub MarkDupes()
x = ActiveCell.Row
y = x + 1
Do While Cells(x, 1).Value <> ""
Do While Cells(y, 1).Value <> ""
If (Cells(x, 1).Value = Cells(y, 1).Value) Then
Cells(y, 3).Formula = "Duplicate"
Else
y = y + 1
End If
Loop
x = x + 1
y = x + 1
Loop
End Sub
View 3 Replies
View Related
Jan 5, 2004
I have 4 columns in my spreadsheet. I am trying to find any duplicates that may exist in Col A, sum values in Col D, then delete the entire row. So far my sheet before I run my vba code is this.
Col A
100
101
102
105
100
101
102
105
Col D
5
4
2
4
1
2
3
1
After my code is run, I need for my spreadsheet to look like this
Col A
100
101
102
105
Col D
6
6
5
5
I have some code but I still need to do a considerable amount of tweaking to it. Currently my code is only deleting the duplicate values in Col A. I am having difficulty summing the values in Col D as well as deleting the entire row.
Here is my code thus far....
-------
Public Sub FindDuplicates()
For RwCnt = 1 To (Worksheets(1).Cells(65536, 1).End(xlUp).Row)
SrchValue = Worksheets(1).Cells(RwCnt, 1).Value
If Len(Trim(SrchValue)) > 0 Then
With Worksheets(1).Range("a1:a" & Cells(65536, 1).End(xlUp).Row)
[Code]....
View 9 Replies
View Related
Jan 5, 2004
I have 4 columns in my spreadsheet. I am trying to find any duplicates that may exist in Col A, sum values in Col D, then delete the entire row. So far my sheet before I run my vba code is this.
Col A
100
101
102
105
100
101
102
105
Col D
5
4
2
4
1
2
3
1
After my code is run, I need for my spreadsheet to look like this
Col A
100.........................
View 9 Replies
View Related
Mar 14, 2012
I have a sheet (see Sheet 1) from a report we run which lists the following information: Personnel Number, Amount, Wage Type. This is generated for 1000's of employees, with each personnel number being repeated several times in column A.
I am trying to pull specific data to another sheet (see Sheet 2), which would ideally generate the sum of "Amount' for a specific wage type for each personnel number. The issue is is that there may be dplicates of the wage type for each ID number (which is also repeated).
For example, the total salary amount on sheet 2 for ID#12345678 would be 0, while for #9876543 it would be 1250. Is there a formula I could use on sheet 2 column B that would generate this?
Excel 2010 ABC1Personnel NumberAmountWage Type212345678550Payment312345678400Overtime412345678300Overtime512345678250
Payment612345678750Vacation798765432800Salary898765432250
Payment998765432100Overtime1098765432450Salary1198765432300Overtime
Sheet1
Excel 2010 ABC1Personnel NumberTotal SalaryTotal Overtime212345678398765432
Sheet2
View 3 Replies
View Related
Mar 5, 2014
I am able to quite easily count the number of specific values in a cell after the table has been filtered. However, the problem I have run into is that some times the data needs to be placed into the spreadsheet twice (or to be more specific the same subject is associated with several unique data points).
What I need: some way to count the instance of some give value in column D only once based on the presence of a duplicate (unique) identifier in column C. However, when I filter the entire database, it must count *only* the filtered cells and not the hidden cells as well.
Picture:
Column C Column D
111111 M
111111 M
111111 M
[Code]....
Currently calculates: M=9, F=2
Right now it incorrectly states there are 9 "M" from column D when it really should be 5 since 3 are duplicate values. My main difficulty is making sure this continues to work after I filter the entire sheet (say column ZZ) and have a bunch of hidden cells.
Equation currently using to count only filtered values (in this case "males" and "females"):
="M = " & SUMPRODUCT(SUBTOTAL(3,OFFSET(D3:D13,ROW(D3:D13)-MIN(ROW(D3:D13)),,1))*(D3:D13="M"))
View 9 Replies
View Related
Mar 26, 2008
I'm trying to calculate and average using a time frame in the day. I want to use a certain number "X" that correlates to a hour/minute in the current time. How do I write a statement to get me the correct "X" value?
example:
8:00 .005
8:01 .006
8:02 .0075
8:03 .0077
8:04 .008
time now is 8:03
How do I get the .0077 in excel?
View 10 Replies
View Related
Aug 21, 2007
I've got two time series (growth rates: what was the forecast for any particular year and what was actual growth rate for that year). I need to compare them to flag those most different. Actually I want to check the accuracy of the forecast. What would be the best function to do it?
View 5 Replies
View Related
Jun 1, 2008
I attached the excel file with two time series data next to each other – the price and an indicator data. I have to automatically identify when the two time series DIVERGE from each other. Diverging occurs when the price makes a new high and the indicators doesn’t make a new high (called “bearish divergence”) and also when the price makes a new low and the indicator doesn’t make a new low (called “bullish divergence”). I attached the two pictures I made to demonstrate these two divergencies.
To spot the divergencies one would go through the price data – finding new highs and lows and then compare each consecutive high and low with the corresponding reading on the indicator field to see if it is also making new high or low. There would be a minimum and the maximum of data points to look back – that would ideally be configurable from a separate input cell. The problem is that I do not know how in principle such task should be approached - is it best to make a macro or can this be done through a series of formulas each building upon the previous?
View 6 Replies
View Related
Dec 29, 2013
I have a series of up to 40 or so entries for given dates. These entries are categorised by either "bid" or "offer" and I'm trying to find a way to chart them both using a pivot table. I'm stuck as it seems that a pivot can only count the number of bids and offers on any given day, but it cannot differentiate between them.
Note: that the original list the pivot depends on will constantly be updated so I can't just develop a custom chart.
I've attached a spreadsheet with an example of what I'm playing with. Pivot graph is in "PIVOT" worksheet, data is in "DATA".
pivotland.xlsx
View 6 Replies
View Related
Oct 24, 2007
I am trying to plot two data series in one chart. The first series has monthly corn prices for last 10 years (~130 data points). The second series has bimonthly chicken prices over the last 10 years ( ~72 points). How can I plot them together?
The bi-monthly periods for the second series do not exactly coincide with calender months ( e.g. Aug 19 to Oct 13, 2007). As a result, I can not adjust the points to match with calender months.
View 2 Replies
View Related
Apr 21, 2008
I just joined ozgrid and this is my very first post. I have read the rules but spare me if I make some errors.
My question is related to plotting time series charts using VBA. I have data in the following format.
04/21/08 9:04:47 4.5055
04/21/08 9:04:48 4.5055
04/21/08 9:04:49 4.5055
04/21/08 9:04:49 4.5055
04/21/08 9:04:50 4.5055
04/21/08 10:05:00 3.5055
04/21/08 10:05:32 3.5055
04/21/08 10:05:40 3.5055
04/21/08 10:05:48 3.5055
04/21/08 10:05:51 3.5055
04/21/08 11:07:59 5.5055
04/21/08 11:09:00 5.5055
04/21/08 11:10:01 5.5055
04/21/08 11:11:02 5.5055
04/21/08 11:13:08 5.5055
04/21/08 11:14:11 5.5055
04/21/08 11:15:16 5.5055
The column on the left is NOW() output and the one on the right is data corresponding to the given date and time. You may interpret the above data as snapshots taken at regular time intervals.
Now what I want to do is make a chart with the above data. Where ever there is a break in the snapshots, represented by a blank line, I want the graph to jump to the next data point much as the way stock prices move from the closing price to the opening price on the next day. I am not able to figure how to do that. Since I want the x-axis to represent time, using scatter charts does not work since the intervals are not proportional to the time then.
View 9 Replies
View Related
Jul 27, 2014
I'm trying to create a spreadsheet for irrigation system program times. Each program has a start time, say 2 a.m. Multiple zones then run for varying times in a cycle. I need to add the run time to the start time to produce the next start time, and continue that through many zones. I can get the first few by simply formatting the cells as ##:## and using =F2+G2 (the start time is in F and the run time is in G) using 20 minute run time as a test. But when it gets to the third zone, my results show 2:60 a.m. and all results are incorrect from there on. Is there any way to do what I need in Excel?
View 2 Replies
View Related