Filtering upon opening document without using VB code

lojanica

New Member
Joined
Feb 22, 2024
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hi All

I am using the excel for the work ticketing system register and in process to improve my system I am looking to implement flows. However my document is xlsm and flows will not work on macro documents.
The only reason I am using macro is to auto filter upon the opening document.
------------------------------------------------------------------------------------------------------------------------------------------

Private Sub Workbook_Open()
Dim mainwb As Workbook
Set mainwb = ActiveWorkbook
mainwb.Sheets("Job Request Register").Activate
mainwb.Sheets("Job Request Register").Range("A8").Select

If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Range("A8:BE8").AutoFilter field:=22, Criteria1:=Range("b6")
Range("A8:BE8").AutoFilter field:=36, Criteria1:="0"

End Sub
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
So basically I filter only for two criteria

Colom V = B6
Colom AJ = 0

Can this filtering be done upon opening the document automatically without using macro?

Thank you :)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Welcome to the Board!

How about having two sheets in your workbook?
The one sheet has the raw data, and the other uses the new FILTER function to dynamically filter the data you want (no VBA required!).

See: FILTER function - Microsoft Support
 
Upvote 0
Solution

Forum statistics

Threads
1,215,200
Messages
6,123,601
Members
449,109
Latest member
Sebas8956

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