Macro To Enable Auto Filter Awaiting User Input?

Jul 21, 2014

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.

View 3 Replies


ADVERTISEMENT

Auto Filter Based On User Input With Multiple Choices

Apr 29, 2014

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.

[Code] .....

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.

Attached Files :

Sales Analysis Template1.xlsm‎
SOURCEDATAEXAMPLE.xls‎

View 2 Replies View Related

Enable Auto Filter Even If The Sheet Is Protected

Nov 30, 2009

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.

View 5 Replies View Related

Force The User To Enable The Macro

Mar 4, 2009

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.

View 3 Replies View Related

Filter From Workbook Based On User Input Form

Aug 6, 2012

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?

[Code]...

View 1 Replies View Related

Auto Enable Macro Code

Feb 23, 2009

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......

View 9 Replies View Related

Auto Generation Of String Based On User Input

Jun 3, 2009

Without using VBA, how can i generate strings say

x1
x2
x3
x4
x5

assuming user has inputed two numbers 1 and 5. I know you might have lots of questions like how the hell user input is coming when there is no usage of VBA.

View 3 Replies View Related

Auto-Fill Data Based On User Input

Dec 22, 2009

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.

View 9 Replies View Related

Insert Rows Based On User Input But Then Auto Delete Them At The End

May 25, 2013

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

[code]....

View 1 Replies View Related

Changing Auto Filter Based On User Inputted Cell

Apr 7, 2007

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)

View 14 Replies View Related

Macro User Input

Mar 28, 2009

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?

View 4 Replies View Related

User Inputs Area Into Macro And Macro Continues To Run After Input

Oct 9, 2012

I have recorded the following marco and it works fine. I would like to modify it so the user would highlight a range of cells rather than have the fixed area :

"'ConsExecProp@20120920'!R4C5:R113C21"

What code lines would need to be added?

Application.Goto Reference:="R4C5"
ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
Array("'ConsExecProp@20120920'!R4C5:R113C21"), Version:=xlPivotTableVersion12 _

[code]....

View 4 Replies View Related

Repeat Macro From User Input

Jun 14, 2008

I have a very simple macro for recalculating formulas and printing the page.

I need a way to show an input box where the user can say how many times to repeat the process i.e. 2x = recalculate, print, recalculate, print.

View 11 Replies View Related

Getting User Input For Find Macro

Feb 27, 2009

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"?

View 3 Replies View Related

Macro Window With Buttons To Accept User Input

Jan 2, 2009

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.

View 14 Replies View Related

Macro To Read User Input For Sheet Locations

Jan 22, 2010

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.

Here's the simple part of the code so far:

Sheets("MM Ades 64z").Select
Range("B8:B59").Select
Selection.Copy
Sheets("MM Pnch 64z").Select
Range("B8:B59").Select
ActiveSheet.Paste
Sheets("MM Ades 64z").Select
Range("D8:D59").Select
Selection.Copy
Sheets("MM Pnch 64z").Select
Range("D8:D59").Select
ActiveSheet.Paste
Sheets("MM Ades 64z").Select
Range("J8:O59").Select
Selection.Copy
Sheets("MM Pnch 64z").Select
Range("J8:O59").Select
ActiveSheet.Paste
Sheets("TMMC").Select
Range("M1").Select
End Sub

View 9 Replies View Related

Auto Filter Macro

Sep 22, 2008

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?

View 9 Replies View Related

Delete Column - Macro Using Data Validation User Input Value?

Nov 7, 2012

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.

View 1 Replies View Related

Macro To Jump To A Specific Cell Based On User Input?

Apr 17, 2013

At the top of my spreadsheet, a day of the week is selected via Dropdown.

Below that in a table, the days of the week are split into hourly slots.

I want to write a macro to jump to the first cell in the bottom table containing the day selected in top cell.

View 9 Replies View Related

Create A Macro To Use Auto Filter?

Jan 25, 2013

I have created a macro to use auto filter with the name specified in the vba code, can I specify a range of cell to do Sutofilter.

View 7 Replies View Related

Auto Filter Controlled By A Macro

Aug 6, 2007

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.

Example...

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!

View 14 Replies View Related

Auto Filter Using Macro On Button

Feb 23, 2012

Auto Filter Using Macro

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.

View 9 Replies View Related

Creating Macro To Auto Inset User Name

Jun 17, 2009

I have tried to create a macro using the record function to copy and paste the user name from Tools/Options/General. The problem is that the macro does not record the copy function and reads like this

View 2 Replies View Related

Visual Basic Auto Filter Macro

Nov 19, 2007

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.

View 9 Replies View Related

End User See The Warning Enable Macros

Sep 10, 2009

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?

View 3 Replies View Related

Macro To Auto Filter And Then Paste Certain Columns To Another Sheet

Jun 11, 2014

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.

Here is the part of my code:

[Code] .....

View 1 Replies View Related

Add Auto Filter (unique Records) Option To Macro

Dec 22, 2009

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).

View 12 Replies View Related

How To Auto Enable ATPVBAEN.XLA

Jul 22, 2009

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?

View 9 Replies View Related

Prevent The User From Saving The Data Input From The User Form If Any Of Those Three Fields Is Left Blank

Feb 9, 2010

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.)

View 2 Replies View Related

Check A User Input To See If The User Has Entered The Date Correctly

Feb 17, 2010

I am trying to check a user input to see if the user has entered the date correctly. I am using the code below but it keeps giving me a "Type Mismatch" error.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved