Average value for each 15 minutes

ibau777

New Member
Joined
Oct 9, 2013
Messages
2
Hi everyone,

I would like to ask for some help for a VBA code.

I have a huge sheet (CSV) with values registered every 1 minute. The CSV is in format: date (dd/mm/yyyy hh:mm:ss) , value

I would like to return the average value for each 15 minutes. The problem is that there are some gaps in the record. For example, there are some days where only few hours are recorded. For this cases, I would like to use the average of the 3 next days for some instant.

Example:

If there are a gap between 01/01/2012 01:00:00 and 01/01/2012 01:15:00 I would like to used the average from 02/01/2012 01:15:00, 03/01/2012 01:15:00 and 04/01/2012 01:15:00 averaged values.

This is quite complex.

I thought about the algoritm. Firstly I think I need to calculate the average for each 15 minutes without considering the gaps (if there are a gap the code should leave a empty cell)

Then the code should find the empty cells and use the next 3 days for estimate the values.

I hope you guys could help me.

Regards.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I already have some code doing what I'm looking for. But for 70000 active cells it takes too much time (2 minutes). I think some things could be improved because I dont know the excel vba "shortcuts".

Can someone help me?
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top