Fill In Missing Dates & Time From Series
Aug 9, 2008
i have a time series of data at one hour interval ( from 6:00 hrs to 18:00 hrs ) each day and again from 6:00 to 18:00 hrs next day and so on for several years. in this series many data are missing. i ve to fill in these missing data in such a manner so that the new values becomes the linearly interpolated values in between the data given at any two hours. no rows are allowed to be inserted in between 18:00 hrs of the previous day to 6:00 hrs on the next day. pl see the attatchment.
View 2 Replies
ADVERTISEMENT
Sep 17, 2009
I have tried many different ways of coming up with a solution of this problem without writing a VBA program, however, Excel's date and time formatting scheme seem to be tripping me up. As a result, I am trying to figure out what direction to go.
I have seached the board up and down looking for a solution and I have found one problem that is midly similar but I do not fully understand the code. I have tried to modify it but to no avail.
Here is my problem:
I have 9 columns of data that are reported in 15 minute intervals for a little over 3 years. There are missing data in the data set and it would be infeasable for me to manually find and replace the missing data. (Over 110000 rows of data)
Example of data (Where "/" delienates column seperation):
Date / Temp 2m / Temp 10 m / Radiation / RH / WindAve / WindMax / WindMin / Rain
6-1-06 12:15 am / 45 / 35 / .0001 / 95 / 5 / 7 / 3 / 0
6-1-06 12:30 am / 45 / 35 / .0001 / 95 / 5 / 7 / 3 / 0
6-1-06 12:45 am / 45 / 35 / .0001/ 95 / 5 / 7 / 3 / 0
6-2-06 6:00 pm / 45 / 35 / .0001 / 95 / 5 / 7 / 3 / 0
6-2-06 6:15 pm / 45 / 35 / .0001 / 95 / 5 / 7 / 3 / 0
So what I need to do is this:
1) Find which data times are missing
2) Add the appropriate amount of rows in between where the missing data would be
3) Add the correct dates to the new rows
4) Add "N/A" to the columns that have no data
You can see that my date and time are formatted in mm/dd/yy hh:mm
I found this on the website and was trying to modify it to my needs:
Sub InsRow()
Dim c
View 9 Replies
View Related
Jul 20, 2012
I am having trouble getting a VBA code to do the following:
2012/05/01 00:00:00
2012/05/01 00:03:00
2012/05/01 00:06:00
2012/05/01 00:15:00
2012/05/01 00:18:00
From this above to this below
2012/05/01 00:00:00
2012/05/01 00:03:00
2012/05/01 00:06:00
2012/05/01 00:09:00
2012/05/01 00:12:00
2012/05/01 00:15:00
2012/05/01 00:18:00
There are data entries next to these time stamps. I am able to create just the time stamps starting at the beginning and ending at the end of the month but I need it to fill in missing entries in a data set. The code below works but only some of the time. I have tried a few different things but nothing works.
Code:
Sub Insert_missing_3min()
'Inserts a row with the date and time where the missing date and time stamp is and a zero next to the date added.
Dim min3 As Date
Dim CurTime As Date
Dim CurCell As Date
Dim NextCell As Date
min3 = 3 / 24 / 60
[Code] ........
View 1 Replies
View Related
Apr 4, 2008
I have a long list of numbers (1 to around 3000) in Column A and I need to print out only the numbers missing from that list. The numbers are sequential (except the ones missing) and there are no blank or missing cells, only missing numbers.
EXAMPLE:
1
2
4
5
7
.....
So I would only need to print the number 3 and 6. - it can be all in one cell, or in one column, it doesnt matter.
View 2 Replies
View Related
Dec 18, 2012
I am currently using MS Excel 2007. Is there a way in VBA to automatically insert missing columns based on a defined series or range of values?
For example, we have a report that displays columns of: Year 2004 to Year 2012 per column (9 columns in total).
Sometimes, it displays missing a year or years (thus; our report has less columns). For example, it only shows 2008 to 2012 (missing 2004 to 2007). At times, it misses some years in between. What we do is manually add those missing years by manually inserting columns then inputting the missing year as their column headers.
Is it posisble for VBA to check if the columns contain all of the defined Year range (for example, you've initially defined: Year 2004 to Year 2012)? Afterwards, all missing columns are automoatically inserted (in chronological order or based on your defined values or range).
View 6 Replies
View Related
Apr 23, 2008
I need to create a formula (not a VBA code as it is a shared spreadsheet) to bring up the next number in a sequence. For example
1
2
4
5
The outcome would be 3 as it is the first number that has not been used.
View 2 Replies
View Related
Jan 22, 2014
I have a tracking template with a column listing dates, all i want to do is find all the missing dates from that column of dates.
Example:
Column A
1-May
2-May
4-May
5-May
7-May
8-May
10-May
11-May
12-May
14-May
15-May
I want to list the missing dates from this list.
View 4 Replies
View Related
Apr 28, 2014
I have data in several rows whereby my column D looks like this:
FebtReport14_01.0000
FebtReport14_02.0000
FebtReport14_03.0000
FebtReport14_04.0000
FebtReport14_05.0000
Throughout the week, additional data is added to the rows, thus creating blank cells within this D Column:
FebtReport14_01.0000
FebtReport14_02.0000
FebtReport14_03.0000
FebtReport14_04.0000
FebtReport14_05.0000
Is there a macro i can run which will re increment only the blank cells to look something like this?"
FebtReport14_01.0000
FebtReport14_02.0000
FebtReport14_03.0000
FebtReport14_03.1000
FebtReport14_04.0000
FebtReport14_04.1000
FebtReport14_04.2000
FebtReport14_04.3000
FebtReport14_05.0000
Also , I will be adding new data quite often, in which newer rows may need to be added in between: ie:
from this
FebtReport14_04.0000
FebtReport14_04.1000
to something like this:
FebtReport14_04.0000
FebtReport14_04.0100
FebtReport14_04.0200
FebtReport14_04.1000
View 5 Replies
View Related
Jul 30, 2012
I have two worksheets in which I am trying to get the blue bold data (not text) derived from a formula.
Main
A
B
C
1
Site #
First Apt Date
Last Apt Date
[Code]....
Apt Report (month/day/year)
A
B
1
Site #
Apt Date
2
1001
[Code]....
I have some restrictions:
I cannot alter the format of Main, except I can add columnsI cannot alter at all the data or format on Apt Report (I cannot sort, filter, pivot, add columns...etc)
Any way for Main to look at Apt Report and give me the earliest and latest appointment?
I have tried the DMIN function but am limited it seems to being able to change Main to accommodate it. I have tried an array with MIN(If but ran into issues with the cells on Apt Report that are blank...it would return those as the earliest appointment....albeit it is correct...but not what I need!!!
The Apt Report will continually be updated to, so I need to be able to search the entire Apt Date column.
View 5 Replies
View Related
Feb 10, 2010
I have 2 sheets in the same workbook (sheet 1 & 2) with one matching column (A) of info and need them to combine and fill the missing data. Each sheet has identical column heading and the amount of data is not the same; sheet 1 has ~2000 rows and the other ~5000. Sheet 1 is consolidated so I would like to fill in the missing cells from sheet 2.
Ex. Sheet 1.......
Ex. Sheet 2.....
As you can see, the missing cells in sheet 1 could be filled from the data in sheet 2; also note that the above info is on different rows (and will be random for each case). I only want the columns to fill in that have a matching email, the other 3000 rows in sheet 2 do not match with sheet 1 and I don't want the rest of it to transfer over.
View 4 Replies
View Related
Mar 29, 2012
I get given a csv file on a monthly basis which contains consumption data per day for the specified period. This sounds simple but on occasion (more often than not) the data has missing days. This can cause me problem later on in my analysis.
I can happily total the monthly consumption using the date and month text. What i want to do however is to sort the csv file into daily consumption and highlight the missing days i.e. have a range of the days in the month and allocate the daily data to the correct date. I currently do this manually but know that there must be a better, automated approach... searching for matching dates for example?
In my head i'm thinking the following approach but lack the coding skills to do it.
1. Define the start and end dates. Perhaps count the number of days between the two dates and autofill the start date down the appropriate number of days in column A?
2. Paste the csv file into a different sheet and, starting from the top, cut and paste the csv data to the correct date created in step 1. Do this for each row based on the csv data.
View 1 Replies
View Related
Jul 17, 2008
I'm trying to setup a macro to run on a database extract that is sent to me. Some of the data is not filled in for each row and I want to automate the auto fill down for each entry based on the Reference # above. I searched the forum for terms that I thought might be related,
Here is the starting data: ...
View 10 Replies
View Related
Dec 10, 2008
I am busy with a very large dataset +-20 000 records showing the movement data
and I am having problem with inserting missing data: I have columns titled day hour and position, but multiple records for each as data was initally recorded by second. Data looks like this
Day Hour Position
1 2 Z5
1 2 Z5
1 3 Z5
1 3 Z4
1 16 Z1
12 2 Z3
13 0 Z3
What I need to end up with is a sequential dataset running from day 1 to 388 with hours 1-24 of each day. Positions need to be filled in for all data recorded (see above). The big problem is that movements between positions need to be recorded and accounted for i.e if more than >80 of time was spent at the position Z3 then that is the position for the hour.
View 9 Replies
View Related
Jul 23, 2008
Bet this is simple to someone...
How can a continue this fill series down a column?
=$BC$3
=$BC$4
=$BC$5
=$BC$6
I would copy, paste and edit only there are 2500 rows!
View 14 Replies
View Related
Feb 5, 2014
I want to run a series of cells but how to do it. E.g.
Cell A1 to contain the data 2A
the next cell (A2) to read 2B
the next 2C etc etc
I've tried just dragging the cells down but it just duplicates 2A, 2B, 2C whereas I want it to fill the next cells as 2D, 2E etc
And I've tried using the fill series option but neither seems to be working (presumably due to the letter).
View 4 Replies
View Related
Sep 1, 2009
I am looking for a formula that I can use in the lower table to fill in the missing County cells, based on the values in the Town/Zip columns on the top table (I apoligize for the crudeness):
CountyTownZipAbleTownA00000AbleTownB00001AbleTownC00002BravoTownD00003BravoTownE00004CountyTownZipMemberTownD00003BlackTownC00002FrankTownA00000GreeneTownB00001JonesTownA00000SmithTownC00006ThomasTownE00004White
This would consist of hundreds of Zips and Towns and this is just an abbreviated mock up.
View 9 Replies
View Related
Aug 10, 2007
i have a workbook with missing dates and would like excel to insert any missing dates and add 0's into that missing dates if there is no data...
for example....
View 9 Replies
View Related
Jun 17, 2007
I have a sheet with a date and the number of months on it which will change. I need the sheet to list the dates in a column for each month automatically: e.g. Two cells contain date “jan07” and the period “10” months. The rows A1 to A10 should have jan07…jan16 listed automatically. If I change then change the number of month to 11 I would like the rows A1 to A11 to update automatically.
View 6 Replies
View Related
Jan 6, 2014
I am working on a spreadsheet and I need values from Sheet1!a2, a7, a12, a17 etc...
I want to fill in the formula ='Sheet1'!a2 etc, to fill column A in sheet2!
When I highlight and drop down to fill excel fills the column in increments of five like i need but doesn't start on the right one. Instead it fills the formula as ='Sheet1'!a6, (For cel A1) and ='Sheet1'!a11, (for cell A2) and so on.
View 14 Replies
View Related
Oct 18, 2008
I am not able to drag & fill series only in one particular sheet, in other sheets this function is working fine.
View 2 Replies
View Related
Sep 17, 2009
Using XL07 I'm trying to programmatically set the fill type to solid and the colour to a colorindex constant for a series in a chart.
I can select/activate specific charts and series, but can't work out how to modify the properties of the series.
I can't for the life of me piece together the method, properties and syntax for doing this.
View 2 Replies
View Related
Feb 2, 2012
I would like to use the Fill Handle to create a column of dates.
The dates must be formatted like this: DD/MM/YYYY HH:MM
The Fill Handle completes the series, but not the way I want.
I want a series that changes the day only. So:
02/02/2012 09:00
03/02/2012 09:00
04/02/2012 09:00
For whatever reason, Excel currently adds a minute or two to the minutes and does not increase the date.
13/2/2012 09:20
14/2/2012 09:20
15/2/2012 09:20
13/2/2012 09:21
[Code] .......
View 7 Replies
View Related
Jan 10, 2014
I am trying to use the auto fill series but I need the series to start over every time the value change in another column.
If i use the auto fill series, it will copy 1,2,3,4,5 and so forth til the end of the column. In this case, i need the auto fill or some other function that will restart once it encounters a different value under the ID column. I've started below to show an example.
IDNo
0.11141
0.11142
0.11143
0.1121
0.1122
0.1123
0.1124
0.1125
[code]....
View 4 Replies
View Related
Jun 18, 2014
How to make fill series number with simple excel formula, like table below :
col.a (desired result)
col.b
1.
john
2.
lia
3.
leo margarette
4.
david lee
etc....
note : not use Vba...
View 9 Replies
View Related
Jul 28, 2009
Prior to declaring a variable i used this code and it worked:
Sheets("442000ON-1+6").Range("C7").formula = "my formula"
range(C7).select
Selection.AutoFill Destination:=Range("C7:N7"), Type:=xlFillDefault
Than i declared a variable b/c i have a number of formulas i need to use but still needed it to fill the formula in a series after the formula ran. I started getting an error.
Fix was:
Dim formula1 As String
formula1 = "=SUMIF(Pivot!$A$6:$A$108,'442000ON-1+6'!$C$3,INDEX(Pivot!$B$6:$BP$106,0,MATCH('442000ON-1+6'!$B$1,Pivot!$B$5:$BP$5)))"
Sheets("442000ON-1+6").Range("C7").formula = formula1
Range("C7").Select
Set SourceRange = Worksheets("442000ON-1+6").Range("C7")
Set fillRange = Worksheets("442000ON-1+6").Range("C7:N7")
SourceRange.AutoFill Destination:=fillRange
View 9 Replies
View Related
Aug 4, 2009
I am looking for help. Sheet1 B1:1 has dates in each column in ascending order for one month. There are missing dates in between the days and they might look like this.
Example 1
7/1/20097/2/20097/6/20097/7/2009
Is there a code that will insert columns with the missing dates between the dates that already exist so that example 1 would become example 2?
Example 2
7/1/20097/2/20097/3/20097/4/20097/5/20097/6/20097/7/2009
View 6 Replies
View Related
May 9, 2012
I have a column:
LABEL COUNT
1 of 2
empty cell
1 of 2
empty cell
1 of 2
empty cell
1 of 2
empty cell
1 of 2
empty cell
1 of 16
15 empty cells
I need to fill the empty cell with the "series" (2 of 2, 2 of 16, 3 of 16). This is just an example of data - there are all different series - 1 of 12, 1 of 5, etc.
Anyway - was hoping to highlight the whole column and be able to auto fill instead of having to extend each series. I have tried straightforward fill series which doesnt work of course. I have tried go to special - blanks but cant find right combo to make it work.
Will it work or do I have to either do manually or with a macro?
View 2 Replies
View Related
Jul 10, 2014
I need to fill multiple number series in the same column. Example:
Have
Want
1
1
[Code]....
View 3 Replies
View Related
Jul 24, 2014
I have a list of 600 unique project IDs in column A. I want to create a second list in Column B that references the contents in Column A, first row then duplicates that item for two subsequent rows, then a formula in the fourth row of Column B a reference to the second project ID in Column A row 2, with two duplicates in the fifth and sixth row.
Column A
Row 1 000891.AB
Row 2 000892.CD
Need to create:
Column B
Row 1 000891.AB
Row 2 000891.AB
Row 3 000891.AB
Row 4 000892.CD
Row 5 000892.CD
Row 6 000892.CD
View 2 Replies
View Related
May 18, 2008
Auto fill series based on Condition.(Excel 2003)
I know very little about macros (basically just concepts). I found this macro suggested in another thread (posted By VoG II…Thanks)
Sub test()
Dim Lastrow As Long
Lastrow = Range("A5").Value + 4
Range("B5").AutoFill Destination:=Range("B5:B" & Lastrow), Type:=xlFillSeries
End Sub
When this macro is run the first time it will fill in the numbers 2 through 15 (as I had hoped). Given 15 is the variable and 1 is the start of the range...
View 9 Replies
View Related