How to Automatically hide rows - Based on Time

pcarrollg

New Member
Joined
Apr 3, 2013
Messages
9
I have a set of 3,000 data points. The data is in one second intervals, however I am interested in seeing what the data looks like in a graph if I only had a point every minute. I have the following set up.

A B C
TIME X Y

What I want to do is to leave the first cell unhidden, and then hide the next 59. And then repeat this so I narrow the data down to one second each. I'm looking to do this multiple times, so I can create a graph each time in order to get an idea of what the data would look like if I only had a point for every minute.

Is there a macro that I could write, that would hide every cell except every 60th one? I was thinking that I could hide it based on the time. What would the code look like if my time was in 00:00:00 format? It's increasing, so I need it to hide cells that aren't equal to XX:XX:01, for example.
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Hamburgler

Board Regular
Joined
May 16, 2009
Messages
148
Assuming your time data are in column A you could enter the following formula into column B starting at B2 to flag the last instance of each minute:

Code:
=MINUTE(B2)<>MINUTE(B3)

You could also use the following to flag every 60th row:

Code:
=MOD(ROW(),60)=0

And then filter to the flagged values. A chart will only show the unfiltered rows.
 

pcarrollg

New Member
Joined
Apr 3, 2013
Messages
9
That kind of gets at what I am interested. However I am having trouble with this still. The second code you gave worked the first time, but I can't figure out how to get it to work a second time.

I am trying first hide rows 1-59, 61-119, 121-179.... And then I want to hide rows 2-60, 62-120, 122-180, ect. I am pretty much looking to make 60 graphs without having to manually hide the data
 

Watch MrExcel Video

Forum statistics

Threads
1,123,142
Messages
5,599,971
Members
414,353
Latest member
ljhan

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
Top