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
ADVERTISEMENT
Sep 13, 2007
I have an excel file with data in it.I also have designed an user form so that the user can select few options in that to filter the excel file and get a new file. The reason i am doing this is because the people who are going to use this do not have any knowledge of excel. In the sample attached, the tab "Data" has the data in it. The User form should filter this particular sheet and throw out a new file. In the userform, I have mentioned the fields to be filtered.
View 2 Replies
View Related
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
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
Jun 19, 2013
I have a form created using the instructions here [URL] ..... however I only have two boxes that I need completing. What I need to do is combine both inputs from the form into one cell. The code below shows this working but I am unable to get the array to work.
Essentially I need to get the array to drop in the old number and new number into the new cell so it looks something like this:
Old Number - 1234
New Number - 6543
Value in cell 1234 6543
The code I am using is set out below:
VB:
Private Sub submitmeterswap_Click()
Dim iRow As Long
Dim ws As Worksheet
Dim myarray As Variant
Set ws = Worksheets("x")
[Code]....
View 4 Replies
View Related
Jul 16, 2014
I am working on an Inventory control worksheet where i have all parts used in a certain assembly on the left (A) followed by Qty per assembly (B) and then current baseline Inventory (C). In columns D-max i will have at the top a pull down menu to let the user decide if they are subtracting from inventory (Purchase Order) or adding to inventory (Fulfillment). Under both circumstances, depending on which is selected I would like a different form to pop up which allows the user to enter values to control the chart.
If Purchase order is selected then a pop up will ask the order number, date, and quantity. This will then fill in three specific cells in the chart which control an equation to subtract the number of parts based on the order quantity.
If Fulfillment is selected I would like a pop up or the entire parts list to appear with a field to enter the number of parts being stocked. The program will then add these parts to the previous inventory entry.
In the example attached you can see that right now you have to manually enter the number of units ordered, then an If statement takes over to calculate the new inventory level (If statement used to keep things neat and possibly to incorporate fulfillment at a later time). At this time there is no way for me to enter stocking transactions.
View 1 Replies
View Related
Dec 29, 2013
Have a person Input an Assembly Number and,Have Excel return a list of Part Numbers, their Descriptions, and a Quantity for each Part Number that will need to be packaged with the Assembly Number that was Input.
The output needs to be in the form of a check sheet (I can play with the formatting if I can get the information out) for the one Assembly Number input.The output can either be in a separate spreadsheet or a User Form. The spreadsheet is easier for me to work with but the User Form looks cooler.
I can use a VBA Function to Input the Assembly Number but then I need some way of searching a small table (about 20x20 cells) to find the matching Assembly Number and then return the Part Numbers, etc. to a check sheet so the parts can be packaged. Each Assembly Number can have several Part Numbers associated with it. Either unique to that Assembly Number or common to other Assembly Numbers. The Quantities can also be unique or common. A couple of simple examples might be:
Assembly Number - ANA0134
P/N Description Qty.
ANA0118 Widget thing 2
ANB0554 Thing Widget 4
Assembly Number - ANA0431
P/N Description Qty.
ANA0118 Widget thing 3
ANB0554 Thing Widget 4
ANC0023 Plain Widget 1
View 4 Replies
View Related
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
View Related
Aug 2, 2008
How to display the userform when the workbook is opened?
View 9 Replies
View Related
May 12, 2009
Have 2 workbooks very similar and need to copy a working user form to newer workbook. Exported and Imported the user form to the new VBA project but can't figure how to bring user form into the new worksheet.
View 9 Replies
View Related
Sep 10, 2009
Is there a way to have an open user form and still be able to navigate in the current workbook/spread sheet(s)?
View 6 Replies
View Related
Jan 19, 2007
I have a form that pulls up. When the person enters in a ticker symbol I would like the VBA code to perform a lookup in a range "Data_Company_Names" (3000 lines long of company ticker sybols and names) and use the corosponding Name to fill in the textbox for the name. If no Ticker symbol is found then the textbox would be blank.
I realize I would have to use some type of Private Sub TextBox1_Change() code but I am not sure how to have it lookup in a range and return the corosponding name to the ticker. For example, when the form pulls up and the person enters AAPL in Textbox1 then Textbox2 value should equal the Apple which is the company name located in the column over from AAPL in range Data_Company_Names
View 2 Replies
View Related
Jan 23, 2013
i was wondering if it was possible to move database entries from sheet to sheet using a user form ? any examples for this ?
View 1 Replies
View Related
Jan 13, 2010
Cell A5 has a Yes_No pull-down list for data validation. In cell B5, I want to display the value 0.002 only if A5 is "Yes". If A5 is "No", I want the user to be able to enter a number into the B5 cell without destroying the formula.
View 4 Replies
View Related
Jun 15, 2008
I have created a macro that processes through information for the creation of checks.
I would like to have a way for the user to input a check number, and Excel to take that number, drop it into cell A2, then increment it and drop the next number in A3, and so on until all of the checks have been numbered. The process should stop at such a point as there is no more text in column B.
Here is an example. Let's say I have 35 checks to write. The first check number is 200. I would want a user box to pop up which asks me for the first check number. I would enter 200. Then the process would place the number 200 in cell A2 (A1 is part of the header information for the checks.) In cell A3, the number 201 would be placed. The final check number would drop into cell A36. No check numbers would appear in cells A37 and greater because cell B37 is empty, signifying that there is no further check data.
View 14 Replies
View Related
Mar 6, 2009
1) Allow user input of a number between 1 and 999
2) Search column three and delete any rows that don't match this number.
I have some code that would delete any rows within a certain column, based on predefined criteria and i've tried modifying it to suit my needs.
View 7 Replies
View Related
May 2, 2009
I have a range of cells that I want to sum based on a range inputed by the user. The range begins with cell c27 and ends with cell au27. I want the user to be asked the beginning cell and ending cell of the range they want to sum and then output the answer.
View 4 Replies
View Related
Feb 10, 2010
I have one sheet to act as a splash page for user input. The second sheet stores all relevant data. My goal is for the user to input a numerical value in a cell (or input box) and then click a submit button. The code for the macro should look at a cell on sheet 1 which displays the primary key of the row in the table on sheet
2. Based on that primary key, it should look to sheet 2 and then insert the value into the table in the correct row and column. The column headings are the days of the week, and the specific day the user is concerned with is also displayed on sheet 1.
Sheet 1:
A1 = Day of the week
A2 = Unique primary key
A3 = user input value
Sheet 2:
table
Rows=primary key (001 - 999)
Columns = days of the week (Monday - Friday)
example:
user inputs '5' on sheet 1 with 'Tuesday' and '007' selected in their respective cells. I would then like 5 to be copied to B7 (row 7 for 007 and column B for Tuesday).
View 2 Replies
View Related
Jun 14, 2006
I am trying to move (archive) data from one sheet to another sheet based on a date range provided by the user’s input. If the date on sheet “list” in the cells in range R9:R10000 fall within that date range the following takes place. The rows that meet the date range per the user’s input in the range of R9:R1000 are copied and just the values are pasted into the next empty row starting with row 7 on the “report” worksheet. The cells that are copied on the “List” worksheet are NOT deleted but the contents are cleared. The reason for this is because there are formulas/links in those cells.
I have attached a worksheet example and have some VBA code but it does not work.
View 9 Replies
View Related
Dec 27, 2007
I have managed to write a macro that almost does what I require, but it inserts the copied row at the end and I want it to insert before the row it's just copied. Any ideas how I can modify the code to do this?
View 9 Replies
View Related
Dec 16, 2009
I wrote a macro which creates desired output based on one default variables. But I want to change it to take user selected assumptions and perform the macro for each user selected variables.
I am confused with user forms and controls and what to use.
Can anyone give the code to how to add a list box to a userform and then add items to the listbox, and run macro based on thegiven input in the list box?
View 14 Replies
View Related
Jan 8, 2009
I'm trying to create a formula similar to this: =sum(B7:B & 8*A2+3). What I want the formula to do is start in B7 and go to B###. The cell number is based on user input. So if the user enters "24" in cell A2, then 8*24 = 192, 192 + 3 = 195, so the formula would be: =sum(B7:B195). Can I do this in a cell, or do I need to run it in a macro?
View 2 Replies
View Related
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
Apr 23, 2014
I have an excel sheet that I've automated for my shop ... Basically it copies a set of rows from one sheet, asks for which cell you want to start the paste at, then pastes it... Here's what I have so far:
[Code] .....
So I tried to use a variation of strReturn to indicate number of rows wanted but that didn't work ... Basically I'm going to create the "data" to include 50 rows, but have it selectable for the user to say they only want 5, 7 or 29 rows ...
View 2 Replies
View Related
Nov 2, 2009
What I am trying to do is get the ROW 13 and ROW 18 outputs depending on inputs in ROW 2 to 5. Inputs in ROW 2 to 5 can have any value in any year. I would like to perform the calculations if the value in column U is 2 (if 1 then no action required)
I don't need ROW 10, 11, 12 separately if that is easier ...I am interested in getting the ROW 13 basically.
View 6 Replies
View Related
Feb 22, 2013
I am trying to find a value in an array based on partial input from a user.
The user will enter the last four digits of a number.
Then the formula should find the number in a list and return that complete number
I will explain using example.
Here is the list of numbers (array):
3003280197
3003283233
3003625456
User input= 3233
formula output = 3003283233
View 3 Replies
View Related
Aug 21, 2008
I am using the following piece of code to delete unwanted rows from a worksheet:
Sub DeleteDates()
FinalRow = Cells(65536, 3).End(xlUp).Row
For i = FinalRow To 1 Step -1
If Cells(i, 3).Value Like "*2007*"
Cells(i, 1).EntireRow.Delete
End If
Next i
End Sub
What I am working with is a sheet of about 5000 customer appointments going back to the beginning of 2006. A have peiced together a lot of code to format it exactly as I want and to create a pivot table of what is remaining after the rubbish has been deleted.
However I am finding that I need to keep amending and re-running this bit of code, depending on the date range I want to look at. For example the code above will delete all appointments made in 2007.
My question is: is there a way that I could incorporate an input box, whereby excel asks the user for a start date and an end date and deletes any rows outwith that range?
Some important info: All of the dates are in column C, in the format mmm yyyy
I would only need to narrow down to a month - so for example mar 2008 - jun 2008
View 9 Replies
View Related
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
Jan 9, 2009
How would I reorder columns & tabs based on a form where the user can put them into order that they would like the columns? I forsee some type of form where the user can dsignate the order and then start a macro that will sort both the columns and tabs.
View 5 Replies
View Related
Apr 11, 2013
I am trying to copy a spreadsheet i made in google docs in excel keeping the same functionality. Since the formulas are a bit different between the two, i can not simply copy the codes so i must start from scratch. The basics of my spreadsheet is that i have (3) columns: A master list, A filtered list, and an input list. I want the filtered list to change based on the values in the inputted list.
ColA = Input list
ColB = Filtered list
ColC = Master list
Items:
Orange
Red
Blue
Yellow
Green
ColA contains the colors i manually enter
ColB contains all the items in ColC that are NOT already listed in ColA (except for Red, i dont what that showing up)
ColC contains ALL the items above.
Two Examples of a functional worksheet:
ColA............ColB
Orange........Blue
Green..........Yellow
ColA........ColB
Orange....Blue
.............Yellow
.............Green
ColB is where the magic happens, it grows and shrinks based on the values in both the master list ColC and the input list ColA
View 8 Replies
View Related