Select certain data rows

L

lee's news

I have 5 columns of data, the first column is time. In this column each row
is incremented in 5mins. So it goes 0,5,10,15,20,25 etc. I want to filter
the data to only show rows every 60 minutes i.e. 0,60,120,180 etc. Have can
i do this, ive had a play with filters but cant seem to find a way. I have
1000's of minutes so it is a pain to manually select each row.

many thanks
 
O

Otto Moehrbach

One way: (VBA solution)
I assumed the time values are in Column A starting with A2. HTH Otto
Sub HideRows60()
Dim TheRng As Range
Dim c As Long
Set TheRng = Range("A2", Range("A" & Rows.Count).End(xlUp))
For c = TheRng.Count To 1 Step -1
If TheRng(c).Value Mod 60 <> 0 Then _
TheRng(c).EntireRow.Hidden = True
Next c
End Sub
 

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

Top