Modifying a macro to hide rows

detweiler

Board Regular
Joined
Aug 2, 2013
Messages
60
So, I had submitted an earlier post, Macro to hide rows ad hoc, in which Peter_SSs helped by supplying me with the following...

Sub Hide_Rows()
Dim sRws As String
sRws = InputBox("Enter rows to be hidden, separated by a colon. eg 5:25 or for a single row just 3")
On Error Resume Next
Rows(sRws).Hidden = True
On Error GoTo 0
End Sub

I have found that the worksheet is becoming rather cumbersome and thought it may be easier to hide the rows prior to a specified date. I skulked around the interwebs and found partial references, including here, but nothing I could make useable allowing me to still use of input box to enter the date I want to compare the dates is column D and hiding all but the first two rows prior to that date.

Appreciate the time and look forward to the comments and suggestions.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Does this have to be a macro? Couldn't you use Data Filtering on the Date column and filter for >= a given date to only show the data you want?
 
Upvote 0
Crystalyzer,

While using the filter was the initial, and easier, choice, the workbook is cumulative and is currently sitting at some 4,800 rows. The reason for hiding is because upon reviewing the data, for whatever reason the filter would be cleared and the im's, emails and phone calls would begin. With as many rows as there are, I did consider using a slicer based on a pivot that could be selected, but just thought it'd be safer to hide those rows that were entered before the set date of those that are being reviewed.

If you have a better idea, I am open to discussing and considering it.

Thanks for the question and taking the time.
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

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
Back
Top