# 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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

#### 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
1
Views
72
Replies
1
Views
296
Replies
13
Views
89
Replies
3
Views
195
Replies
2
Views
262

1,172,144
Messages
5,879,287
Members
433,417
Latest member
Razor_Rob

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

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