Hi,
I am a rookie at Macros!
I am using Excel 2013 on Windows 7.
I am currently trying to summarise average temperatures for each day of the year. I have downloaded the data from an onine BMS interface which gives the temperature every 15mins (up to 100 samples per day) so trying to find the daily average temperature will take quite a while manually.
I am trying to run a macro so that it will find the daily average temperature for me automatically.
My sheet is as follows.
Column A: Dates
Column B: Time sample was taken
Column C: Temperature
So what I have done is put each date 01/01/2011 - 31/12/2011 in Column E. I want to find the average for each date and put the value into the cell to the right of the date in column E.
I have been trying to write the macro myself but have had no luck so far. Here is my code:
Sub Test4()
Dim i As Integer
Dim j As Integer
j = 6
For i = 3 To 367
Worksheets(2).Cells(i, j).Value = _
"=AVERAGEIF(A3:A33186,Cells(i-1,j-1),C3:C33186)"
Next i
End Sub
It is returning DIV/0 error in the cells. Is this even possible to do?
Any help would be greatfully appreciated!!
I am a rookie at Macros!
I am using Excel 2013 on Windows 7.
I am currently trying to summarise average temperatures for each day of the year. I have downloaded the data from an onine BMS interface which gives the temperature every 15mins (up to 100 samples per day) so trying to find the daily average temperature will take quite a while manually.
I am trying to run a macro so that it will find the daily average temperature for me automatically.
My sheet is as follows.
Column A: Dates
Column B: Time sample was taken
Column C: Temperature
So what I have done is put each date 01/01/2011 - 31/12/2011 in Column E. I want to find the average for each date and put the value into the cell to the right of the date in column E.
I have been trying to write the macro myself but have had no luck so far. Here is my code:
Sub Test4()
Dim i As Integer
Dim j As Integer
j = 6
For i = 3 To 367
Worksheets(2).Cells(i, j).Value = _
"=AVERAGEIF(A3:A33186,Cells(i-1,j-1),C3:C33186)"
Next i
End Sub
It is returning DIV/0 error in the cells. Is this even possible to do?
Any help would be greatfully appreciated!!