# How to Automatically hide rows - Based on Time

#### pcarrollg

##### New Member
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.

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

#### Hamburgler

##### Board Regular
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
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

#### pcarrollg

##### New Member
I think I've got it working using the following

=MOD(ROW(),60)-1=0

Thanks

Replies
5
Views
417
Replies
3
Views
414
Replies
0
Views
353
Replies
1
Views
283
Replies
19
Views
428

1,172,032
Messages
5,878,823
Members
433,373
Latest member
strichpunkt

### 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.

### Which adblocker are you using?

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

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