Weather data Sorting with formula

  • Thread starter Thread starter betomovil
  • Start date Start date
B

betomovil

I have a 2 year Weather database that i want to sort. The Weather
station takes data every 30 minutes. So I Get 48 lines per Day. What I
want to do in excel is to get the line with the higher temperature from
every day and take it to another worksheet so i can graph the high
temperatures monthly.
I have Several columns.

Date, Time, Outside Temp High Temp, Low Temp.

Any Ideas??
 
I am not really sure how to do this in code - but the idea is:

A B C D
Date Time Outside Temp High Temp Low Temp

1. Find the Max value in the range restricted to the date.
x = Max(C49:C97) ' I'm not sure how to define the range
' In code this would be
WorksheetFunction.Max(.....
2. Find the row number
y = Match(x,C49:C97,0) ' In code this would be
WorksheetFunction.Match(....
3. Find the 1st open row on the Archieve sheet
lrw = Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).Row
4. Copy/Paste data
Sheets("DataSheet").Range(Cells(y,1),Cells(y,4).Copy _
Destination:= Sheets("Archieve").Cells(lrw,1)
 
This is probably best suited to a pivot table. Pivot the data (Data -> Pivot
Table). Date and time in the left column and teperatures in the middle. Group
the date/time data by day (you will have to add these two fields together
prior to pivoting). Select the field settings and get the Max of the
temperatures. Now use the charting function to graph the values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top