Hide certain rows

M

master811

Is there a way to hide certain rows depending on the data that the
contain?

I am trying to only display data that is between certain dates, (i.e
it only displays data from now until 6 months later and so will chang
everyday)
 
R

Ron de Bruin

Hi

You can use Data>AutoFilter

Choose Custom in the dropdown and use
Greater then and Less then
 
A

AlfD

Hi!

One way would be to use Data>Filter>Autofilter and set up a custom vie
of the worksheet (values greater than xx and less than yy).

Another would be to run a small macro along the lines of

Sub HideRows()
Application.ScreenUpdating = False
With ActiveSheet
For i = 2 To 600
If .Range("A" & i) < .Range("A1") Then .Rows(i).Hidden = True
Next i
End With
End Sub

This happens to assume you have dates in A2:A600 and a future date i
A1 (I used Today() + 180, which will update itself)

Set up a button to activate it, perhaps.

If either seems appropriate but, as yet, inaccessible, post back.


Al
 
M

master811

Thanks for that, its just the auto filter doesn't update itself, (i.e
if today's date changes, you need to redo the filter, is there a way s
that it only data from now until 6 months is displayed automaticall
with no additional user input
 
I

icestationzbra

i would suggest that you use advanced filter, run by a macro that coul
be housed in worksheet's activate event. the details advanced filte
could be found on www.contextures.com
 
Top