VBA Code - Date conditional for hiding rows

BRETTnaylor

New Member
Joined
May 15, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am new to using VBA Code.

I have attached copy of the workbook I trying to create.

I would like to run a VBA code to automatically hide an entire row based on one condition.

If the date paid is greater than 20 days from today's date then the entire row should automatically be hidden.

Thanks in advance
HELP_PLS
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Welcome to the Board!

Many people are leery of downloading files from the internet, so you may have a better chance of getting a reply if you can post a sample or image of your data here.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

If you unable to do that, can you just tell us what column this "Date Paid" data is in?

And when you say that you want this code to run "automatically", VBA code can run automatically, but only upon some "event" happening.
These events can include things like:
- the manual update in a specific range
- the opening of a workbook
- a re-calculation happening somewhere on the sheet
- etc

So what "event" do you want to automatically trigger the code to run?
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

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