I need a macro that simply allows me to open the filter criteria dialog to "contains," then stops, so I can enter the value to be filtered. Macro recorder does not allow me to stop recording at the point the "contains" dialog appears.
I have here an example of how I might extract data from a source workbook and paste it onto a template workbook, using autofilter to find the rows that are needed. It is currently set-up to take rows that match "AREA 1" or "AREA 2" in column A, along with a number of other criteria in other columns.
What I want to do is add into this macro, a way for the user to be able to choose the filter options will be used for column A of the source workbook. So if they want only "AREA 1", they can choose just that, or if they want "AREA 2", or perhaps both "AREA 1" & "AREA 2", or further additional options. They need to be able to specify just one, multiple, or all of the filter options with regards to column A of the source data.
In effect what I need is a user input box or form with a dropdown menu that will give the filter choices based on column A of the source data, and then for the code that copies the data across, to do so based on which choices the user makes in the filter menu of the input box.
I have uploaded examples of the source data workbook and the target template workbook. The macro exists within the template workbook.
How it may be possible for the user to be able to specify, one, multiple, or all available filter options for column A of the source data, via a user input box or form.
Is it possible to enable autofilter even if the sheet is protected. i have protected certain columns in a sheet as it contains formula but i need to filter the values based on auto filter. This is not working as the sheet is protected. is there any way to enable auotfilter.
I have Excel file that is linked to Access Database. Everytime the user opens the file, there is pop up message that warns the user we there to enable the macro or to disable it. I want to force the user to enable the macro or even better if I can make disappear this warning and automatically enable the macro. See attached for more details.
I need to filter data based on criteria based on user input form that is in another workbook. For example, I have a list of departments, I want to create a userform for the user to enter department number and then have excel filter only the data belonging to that department. The person will then update the department records and save the file.
Here is partial code I have been working on but having difficulties:
Dim FilterCriteria Dim CurrentFileName As String 'Get the current file's name CurrentFileName = ActiveWorkbook.Name 'how do I call another workbook?
what the code to auto enable a macro? I have tasks running on my computer. Everytime they run, I have to click on enable macro. I thought there was a way to automate this, but I can't find the code......
Excel 2003, I have a list of products with corresponding prices located on a hidden worksheet. I have a spot on another worksheet where users can select a certain product and next to that cell there is a column for price. What I want excel to do is auto-populate the price cell based on what product the user selects. For instance, if the user selects OD2000N, then I want the price to auto-populate with the corresponding price that is found on the hidden sheet. Like I said before, I know this has probably been answered, maybe even mulitple times but I can't seem to find the appropriate thread.
I have a spreadsheet that I use throughout the day and have to send an email to another person when a customer makes a payment. The number of products they pay for will be different each time and I have the code to copy the right cells into an email and the code to insert the right number of rows for how many things the customer is paying for however as I use it multiple times through the day, I need the code to insert the right number of rows, copy it over to the email then automatically delete the rows it has just inserted so it is back to basics so I can use it again.
The code I have for the inserting the rows (from searching through forums) is:
Sub PRows() Dim NextRow As Long Dim NrOfCopies As Long Dim i As Long Const NrOfCopiesDefault = 1 Const NrOfCopiesMaximum = 9
I have a Workbook that has 2 worksheets, one called CALL QUERY and one called CALL LOG. On the CALL QUERY sheet, cell D9 is a user inputted cell with the cell validation set to list. The user uses the dripdown list to pick an office identifier (3-Letter Code).
On the CALL LOG sheet, I have info about individual calls. Column E has the 3-letter office identifier for each call.
I am trying to find a way to automatically auto filter the list on the CALL LOG sheet with the user input in cell D9 on the CALL QUERY sheet.
I was given the following (N2 is a cell on the CALL LOG sheet that equals the user inputted cell D9 on the CALL QUERY sheet)
I would like to do a Macro which requires user to go to a specific line which is variable in each work sheet. I would like to be able to enter the number and then delete all lines below that point and then continue with the balance of the macro.
Is there an easy way to pause the Macro and then restart it? Or is there a code that I can insert in the Macro to locate a specific Cell and then delete all lines below the next line?
Due to the economy we are only scheduling days to work one week ahead which leads to alot of phone calls. The gaurds who get the calls then search thru a printed spreadsheet looking for a clock number or last name. I realized right away they should just look at the file on the computer and due edit - find. The problem is they due not use computers unless printing and they looked at me like I was talking in a different language. So I want to edit this macro below so it will allow user to type in search criteria instead of using same search criteria every time. Here it is 70039. I also need to place a shortcut or button to this macro on the toolbar or sheet and do not know how. How do I stop "remove macro or enable when file is loaded"?
I'm very new to Excel and definately to macros/vba. I've already received a tremendous amount of help with this file but I'm am really struggling here and getting very frustrated! I've got a pretty good handle on the excel part but the macros/vba is another story. Here is what i'm attempting to do: I've created a form "frmMacroButtons" which has 8 buttons. When the workbook is opened I want this form/window to launch. I want the user to be able to select any of the buttons but also be able to just click into the worksheet manually if wanted but have the window stay open to go back to use the buttons. Each of the buttons I've typed a description of what I want each of the buttons to do in the code view.
I'm working with a workbook that has about 75 sheets. I need a macro that will copy the info in a certain couple of ranges from one sheet to the same ranges in another. This would not be a problem if it was always the same two sheets. But I need the user to be able to specify which sheet he wants to copy from and which sheet he wants to copy to.
The ranges on the sheets will always remain the same, just the sheet name needs to change. I created drop down boxes for the user to choose the copy from and copy to sheets, but I don't know how to insert that into the VBA code. The way I've designed it, the macro needs to read the result from the user that is on sheet "Index" in cell H5 to copy from and N5 to copy to. The result in those cells is the actual sheet name.
Sub Custom3() Range("A785:BW1455").AutoFilter Field:=2, Criteria1:="a" Range("A785:BW1455").AutoFilter Field:=3, Criteria2:Range ("N").value End Sub
Is Field 2 referring to Column B? So if I want to filter on the 9th row heading (going from left to right), my Field: = 9?
In the example above, the 1st criteria revolves filtering on dates with the goal of exceeding a certain date (i.e. > 1/1/08). Is there a way to reference the cell (which is in another workbook which is already open) in the criteria?
I would like to delete a column using data validation list. for example :
i have a data validation INPUT list in cell A1 (Part No., Supplier 1, Supplier 2, Supplier 3) the heading start from B2,C2,D2,E2,F2. If user select Supplier 1 from data validation list in cell A1, the column Supplier 1 [c2] should be deleted.
And/or also if in cell B1 have a data validation INPUT row list (Part no.) & if user select part no., the selected part no. row should be deleted.
I'm trying to set up a macro to to run and control the AutoFilter in my Excel Spread Sheet. Essentially, all i want to be able to acheive is, instead of inputting the cryteria myself in the auto filter, i want the macro to select the cryteria from a specific cell.
Running the autofilter, normally you would select "equals or grater than" option and you would input a figure then click the "or" option then input "equals or less than" and a new figure and then click ok. This would sort the range; see the example macro...
Selection.AutoFilter Field:=10, Criteria1:=">=01/09/207", Operator:=xlOr _ , Criteria2:="<=31/09/2007" ActiveCell.Offset(774, -1).Range("A1").Select ActiveWindow.SmallScroll Down:=-15 End Sub
What i want to beable to do is to run a macro which will do the above but instead or requiring the user to input the range cryteria for the filter it would point to a cell to get the value from.
' test1 Macro ' Macro recorded 06/08/2007 by Nigel M Bailey ' Selection.AutoFilter Field:=10, Criteria1:="> Cell A2", Operator:=xlOr _ , Criteria2:="< Cell A3" ActiveCell.Offset(774, -1).Range("A1").Select ActiveWindow.SmallScroll Down:=-15 End Sub
In doing this i can validate the selection field and just add a search button which then will be perfect!
I have a Spreadsheet with names and other data, my question is, can i somehow Auto Filter the First name with a macro that I can assign to a button, what I would like to do is type the First Name in A1 and in B1 have a button that I can press and it will filter all with the name and other data on the same row I have typed in A1 will only be shown.
I have a excel file that was created by someone else 7 years ago - I still want the formulas that were created but I have updated the information on the spreadsheet and now the macro will not work
Sub DataSort01() ' ' DataSort01 Macro ' Macro recorded 11/18/00 by Terry Schiesser ' ' Keyboard Shortcut: Ctrl+t ' Selection.AutoFilter Selection.AutoFilter Field:=2, Criteria1:=">0", Operator:=xlAnd End Sub
when I do the ctrl+t it wants to debug I select the debug option and then it goes to the screen above but the "Selection.Autofilter" is highlighted.
I have a couple spreadsheet Excel 2003 that I have to Email, I use a few macros with these spreadsheets. The Macros are kept in my personal workbook. When I Email these sheets does the end user see the warning enable macros or do they just see the sheet as is. I am mailing the whole workbook but macros are in my personal workbook. If they see the warning is it possible for me to Email so they will not have to contend with that?
I am running a auto filter macro to I need to change it to only copy column A:B and past in column C:D in the sheet called "Diary". How to change my current macro to only select column A:B and paste it. It is currently pasting the entire row.
I have been modifying a workbook and the original macro will send to the sheet Results once the "Search" button is clicked, but I have found that this macro is displaying duplicate records. Can anyone help me put in an auto filter to find only unique records? My second workaround option is if someone can help me remove the go to/select sheet option from the "Search" macro so that a user will not automatically be sent to the Results tab and will instead hit the "Confirm Category Selection" button (which auto filters before sending the user to the Results tab).
I'm using the following code to automatically install the Analysis ToolPak Add-ins...
Private Sub Workbook_Open() If Not AddIns("Analysis ToolPak").Installed Then AddIns("Analysis ToolPak").Installed = True If Not AddIns("Analysis ToolPak - VBA").Installed Then AddIns("Analysis ToolPak - VBA").Installed = True End Sub
... However, completion of the ATP-VBA install requires in the VBE that Tools> Reference and ATPVBAEN.XLA be enabled.
What VBA code do I need to complete this last step?
I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.
What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)