Auto-hide rows based on a cell value..

Krrumler

New Member
Joined
Jan 28, 2015
Messages
1
Hi ,

My name is Kristen I work for Tucson Subaru in Arizona. I have created a spread sheet to keep track of cars we are selling at auction. With as many cars we sell at auction we are anticpating this list to become very long, fairly quick! What I want is for rows to auto-hide after a car has been on this list (or gone to auction) 60+ days ago. I know it is possible through coding or creating a macro, but unfortunately I am having no luck on my own. I wasn't able to attach the document so generally speaking this is roughly what it looks like.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Stock #[/TD]
[TD]Vin #[/TD]
[TD]Make[/TD]
[TD]Model[/TD]
[TD]Date[/TD]
[TD]Location[/TD]
[TD][/TD]
[TD][/TD]
[TD]Today[/TD]
[TD]60 days ago[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]=TODAY()[/TD]
[TD]=I2-60[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Date - represents the date the car is went to auction and the value I want to auto-hide row based on.

Row J is what the date should be equal to or older than

I currently have the spread sheet formatted as a Table, I don't remember if that matters at all
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try:

Code:
Private Sub Workbook_Open()

    Set ws = Sheets("YourSheetName")

    For i = 2 To ws.Cells(Rows.Count, "E").End(xlUp).Row
        If ws.Cells(i, "E") <= Now - 60 Then
            ws.Cells(i, "E").EntireRow.Hidden = True
        End If
    Next i

End Sub

Put it in Workbook module.
 
Upvote 0
My name is Vinod, I have created an employee evaluation form, and some of the evaluation criteria are not applicable for all employees, and it will be marked as D. How can I hide that specific row with a formula in excel 2013.
 
Upvote 0

Forum statistics

Threads
1,223,719
Messages
6,174,089
Members
452,542
Latest member
Bricklin

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