Forum Discussion
Excel, unbale to get a VBA macro working to hide rows
- Sep 25, 2023
See the attached version.
If the end date is left blank, it will work as before.
If you enter an end date, ALL sections that overlap the period from start date to end date will be displayed.
The formulas now use Sheet3. I left Sheet1 in the workbook, but it is not used anymore.
The code should react to changes in B2, since that is the cell edited by the user.
Worksheet_Change does not react to changes in B4 since it contains a formula.
In the attached version, I changed the formulas on Sheet1 since they didn't work on a system with non-US dates. It should now work regardless of the date format.
See the attached version.
Thank you so very much!
You have no idea how must elbow pain I have been in this past week trying to figure this out and creating the branching questions.
I have a follow up question to this sheet.
Lets say I had to had an end date, say B3 for example.
How different would that be if the dates overlapped into 2 or 3 versions?
I am worried we may need to add that down the road.
Thank you!
- HansVogelaarSep 25, 2023MVP
See the attached version.
If the end date is left blank, it will work as before.
If you enter an end date, ALL sections that overlap the period from start date to end date will be displayed.
The formulas now use Sheet3. I left Sheet1 in the workbook, but it is not used anymore.
- Shipwreck818Sep 26, 2023Copper Contributor
question , I was working from home yesterday and everything worked fine . I sent this to my work computer and made no changes , for some reason I am getting a Run Time error 13, type mismatch. Case “Preversion-1” is highlighted yellow. Is this because I’m using my work pc?
- HansVogelaarSep 26, 2023MVP
What do the cells B5:B15 contain? Is there a cell among them that displays an error?
- Shipwreck818Sep 25, 2023Copper ContributorYou are a life saver! Big thanks I greattly apprecite your asistance! Now we have both options avilavable, this saves us a lot of time reviewing cases. It has been a long time I felt this great on a Monday morning!