Delete Item From Search Results Userform
Oct 24, 2011
Any way to use a search form I've created to delete data from the original sheet. What I'm doing here is using advanced filter to copy data from the original database onto a temporary sheet to display in this list box. I've gotten almost everything to work properly, but since this is populated by advanced filter, I don't really even know where to start on my delete button.
Code:
Private Sub Search()
Dim Criteria As Range
Dim SearchRange As Range
Dim SearchResults As Range
Set Criteria = Range("Values!Criteria")
[Code] ......
So I was thinking something like this:
Code:
Private Sub cmdDelete_Click()
lstResults.Value.delete
End Sub
But I know this won't work.
View 1 Replies
ADVERTISEMENT
Oct 17, 2012
I've put together a workbook that has 2 sheets that contain stock details and location info (i.e. part number, description, Location & stock level). I need to have a search function outside of the 'built-in' Ctrl+F (or Edit > Find) search function, i'd assume this would mean using VBA?I invisiage making a userform embedded within the very first sheet of the workbook and having this form be opened when accessing the worbook - maybe hide the other two sheets containing the data? Within the search userform, i would have a 'part number' & 'description' search input boxes for data input, either one could be blank but atleast ONE must be inputfor the search to work. On pressing the 'Search now' command button in the userform, any reults found would be displayed in a listbox at the bottom of the said userform. If no results found, a dialog box would pop-up saying 'No Items Matched"
View 7 Replies
View Related
Sep 20, 2007
I am trying to populate a UserForm with data from a spreadsheet using a search function instead of just providing a Next and Previous search function (which works). The following code is able to search for and select the correct row on which the data resides.
Private Sub cmdBlankFind_Click()
Dim FindMe As Variant, FindCell As Range, FindCell2 As Variant, Data As Variant
With Range("BLANK")
FindMe = InputBox(Prompt:="Please enter search criteria:")
Set FindCell = .Cells.Find(What:=FindMe, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
FindCell.EntireRow.Select
Data = FindCell.Value
tbxBlankAccount.Value = Data(1, 1)
End With
End Sub
View 9 Replies
View Related
Jan 17, 2009
I have a database of 13 columns and ever increasing rows.
I want the following to be there on my userform.
1 combobox: showing the list of categories from which to search.(The categories are the column headings in columns A1 to A13.The user will have to select one category.
1 textbox:Here the user will enter the search term.
1 Command Button: When the command button is clicked/entered, the code shall be such that it will search in the column corresponding to the category mentioned in the combobox and display the results( The entire 1 row x 13 cloumns containing the search term) in a Listbox. If the search term does not matches then a message box should appear with the message "No entries found"
[b]
1 Listbox:to display the search result as mentioned above.
View 13 Replies
View Related
Sep 16, 2009
I'm using a userform to report on set of worksheets. Two of the functions are:
- reporting on the number of contacts with a client
- displaying the details of all contacts with selected client in one textbox.
I can't work out how to concatenate the text of all the contacts relating to one client in a text box (txtContactHist) on the userform.
Using the countIf function I'm trapping zero matches.
The worksheet containing the contacts has the following data columns:
Col A - Customer ID
Col B - Detail of contact
Col C- Date of Contact
Columns B and C contain the data I want to capture
Column A (the customer ID) is the column that is searched for a match ( via the userform text box (txtLic.Value))
To work out the total number of contacts, I use this bit of ...
View 6 Replies
View Related
Apr 21, 2014
I am creating a database using excel and I've created a userfrom for ease of data entry and searching the database. But now I am stuck at the searching part.
The sheet is Sheet1 and the userform is UserForm1. Based on the pic that i have attached, user needs to key in the keywords in any of the textboxes and comboboxes in the group box labelled "Organizational detail" and when he/she clicks on the Search button, the userform will display the whole rows where the search results reside onthe listbox. When the user click on the search results on the listbox, the textboxes and comboboxes will be updated with the data on the listbox.
View 3 Replies
View Related
Jan 15, 2009
I am trying to do a two way lookup with multlple results. In the example attached I want to know the names of the people who were in Boston on 01/02/09. I have tried a number of index, match formulas to no avail.....
View 3 Replies
View Related
Jun 26, 2014
How I can generate a summary of model outcomes utilizing each of the items in dropdown list... The dropdown selections reference unique input scenarios to a corporate finance model. I need to share the collection of the model outputs (revenue, EPS, etc.) from all the unique scenario input options. Currently I select Scenario 1 in the dropdown, then cut-paste values of the generated results table into a separate worksheet section labeled "Results 1", then select Scenario 2 and paste "Results 2" values, etc. etc.
Is there a method by which to automate running through the dropdown selections and extracting the scenario results?
View 2 Replies
View Related
Apr 3, 2012
I'm having trouble trying to setup a spreadsheet for work to do production scheduling. I have a temporary thing working so far but, but there is a minor hickup with certain products.
Products A, B & C can be processed normally on their own and each occurrence is identified with its unique serial number and can be traced through the schedule. The problem is that there has to be 3 occurrences of Products E & F before they can be processed in a single batch (They're smaller and its more efficient to process them together).
I'm struggling in that I can't process 1/3 of product E (Serial no. xyz123).
I would need to be able to identify 3 of these products, batch them together and follow them through the schedule.
Plus, if there was 8 of product E to be made, I can only process the first 6 which leaves the last 2 out.
View 1 Replies
View Related
Dec 1, 2011
Searching a text string on Sheet 1 to see if it contains any item in a list (on Sheet 2 Column 1) and if so return the value of Sheet 2 Column 2 next to the list item found?
It's a budget problem: Sheet 1 has my downloaded Visa statements. I want to categorise all items.
Eg Any item containing the string 'safeway' is categorised as 'General expenses'. So the list on Sheet 2 has an item called 'safeway' and in the next column 'General expenses'.
And for the item on Sheet 1 'BPAYN BUPA AUSTRALIA BPAY MBF monthly' I have an item in Sheet 2 that is simply 'BUPA' with category 'Medical expenses'.
View 6 Replies
View Related
May 2, 2006
I wish to compare each item (4-8 digit alphanumeric ID) in a list in column B of worksheet 1 (Portfolio) to all of the items in column B of worksheet 3 (EssBase Cap). The data (ID) in column B of 'EssBase Cap'! is concatenated with its description so my code needs to strip off the leading zeros and everything after "-" in order to do the comparison. Once a match is found it should copy the corresponding values in 'EssBase Cap'! for that row, column D and E to 'Portfolio' Column J, and K. I have created some pseudo code and need to translate this to Excel VBA
Dim IBSPWD As String
Dim ProjectPCN As String
Dim Pos As Integer
Dim I As Integer
Dim J As Integer
For I = 3 To 'to end of range ? WHat is the code to find end of the range IE no more data?
For J = 6 'to end of range ? The nested for loop will check each item in Portfollio and compare it to each item in Essbase Cap
IBSPWD = 'EssBase Cap'!Cell(J,"B") 'fill in the string with data
Pos = InStr(1, IBSPWD, "-", vbTextCompare) 'find length of the string befor "-"...............................
View 3 Replies
View Related
Sep 30, 2009
I have a spreadsheet!
I have two sheets, one of which contains film names and the other contains our tag structure for our website (which is a list of tags, their keywords and the primary parent channel they live under).
What I am trying to do is search the film titles and if any of the words match either the tag name or keywords then return the relevant channel.
Example:
Sheet 1 - Films
How To Apply Bridal Makeup
How To Fight A Donkey
How To Write Excel Formulae
Sheet 2 - Tags
Channel / Tag / Keywords
Tech - Microsoft - windows vista xp word excel
Tech - Computers - internet pc
Tech - MP3 Players - iPod Zune
So, for film 3 on Sheet 1 it would recognise the word Excel in the keyword list and return the channel Tech.
View 12 Replies
View Related
Mar 15, 2008
I am trying to make a summary from a table showing the newest value available for a set of items(1,2,3,4), this is according to an investigation date the summary table shoul display only the values for the investigation date, but if there are no values for the investigation date, them should take the previous recent date from the investigation date, and if there is not value at all, then shown N/A
I am attaching the excel sheet for a better ilustration of the problem
I tryed a combination of formulas that I tooked from other threads but is not working properly.
View 12 Replies
View Related
Jul 31, 2013
I am trying to add a list of items to a combo box which is in a user form using vba. Find the file as attached. My code is as follows: when i double click on the combo box it opens editor.( 4th item: Frequency )
Private Sub ComboBox1_Change()
With .ComboBox1
.AddItem "Y"
.AddItem "M"
.AddItem "D"
End With
End Sub
View 4 Replies
View Related
Mar 19, 2013
how I can build a search engine. I have attached a file with an idea about how I would like it. What I would like to have is a sheet with a search button. If the correct number is putted in this file the corresponding data should appear in the same sheet. I do not know how to make this at all!!
This is just a small file but if i know how to build it, it would concern a much bigger file and maybe even some graphs (if that is possible)
View 8 Replies
View Related
Dec 7, 2006
Is it possible to search a worksheet that may contain different number of rows (from day to day) and for every instance of a word like "HOLD" is found in column "C" to Color that intire Row Red and also Bold the Row as well?
View 9 Replies
View Related
Jan 9, 2007
I have a Excel Charts (waterfall graph) which has let us say 10 items in the rows. the first one represents the intial and the last one represents finish. If I want to delete one item in between the first and last, the finish item vanishes. For example I have the following series and I want to delete item G from it. The Finish item vanishes from the graph
Intial200
A100100
B7030
C9020
D5040
G4020
Finish30
View 7 Replies
View Related
Feb 3, 2007
I wunder if it is in any way possible to delete an item if you drag it outside the boundries of the listbox
View 2 Replies
View Related
Jul 5, 2014
I've created and coded a vba userform that creates purchase orders for my projects. The user begins by selecting the project code from the combobox (the project code is a unique identifier of each project). Once the purchase order is created, the information is logged in a separate sheet called "POLog" and the userform is cleared. The project code is saved in the first column of the "POLog".
My problem is that when I have more than one purchase order to create for the same project (sometimes I have 20 or 30), the combobox starts out empty and I have to manually select the project code from the combobox. Is there a way to allow the userform to recall the last project code that was used? Maybe recalling it from the last row in the "POLog" sheet?
View 7 Replies
View Related
Sep 18, 2012
I have "Sheet1" with thousands lines of data like following
ID Customer value date etc,......
2434 ABC 500 2012 data
2654 DEF 600 2013 data
and another sheet "sheet2" to hilight attention to a risk or issue like following
ID description status to do by etc,....
2434 missing items follow-up and fulfill Eng. A
I need to add a hyperlink to the ID number in BOLD to link me to the line matching in sheet1.
View 9 Replies
View Related
Jun 18, 2014
I want to highlight particular characters in an excel cell. This cell may contain other words as well.
For example, if i search for the word "apple" in the excel sheet, only that particular word in the cell should be made bold. the cell may contain " I like apple". in this case "I like" should be left as it is.
View 1 Replies
View Related
Feb 6, 2014
I manage an monthly inventory spreadsheet with over 100 various items in the master list. However in any single month there may be only 5 or 10 active items that need to be reported on. How do I develop a macro that will check the "items on hand" column and delete the entire row if the quantity is "0". My report is limited to showing only items on hand and not the entire list of items.
View 1 Replies
View Related
Jan 26, 2009
You can find attached the workbook I am working on.
In my workbook I have four sheets. Only two sheets are relevant in this case: "Sheet1" and "List". On "Sheet1" there in column A there is big range of codenumbers (highlighted with red).
On the "List" worksheet I have a smaller list (highlighted with green).
I have a code also in module1 but the code is not working.
I would like my macro to do the following. Check the code number from the "List" worksheet (green) and search for it in "Sheet1" column A (red). If this codnumber can be found in column A then leave the number on the green list. If it cannot be found in column A then, delete it from the green list. If you open the file, you can see on the "List" worksheet that there are three code numbers in the green range. The upper and the bottom code number can be found on the "Sheet1" column A (red) range, but the middle number cannot be found. So if the macro would work correctly then it would delete the middle number, and leave the other two untouched!
View 14 Replies
View Related
Oct 15, 2007
How do I populate a new userform from an entry selected in the listbox. The listbox only lists one item from the original table but I'd like to populate the new userform with related information from the same row.
I'd then like to save this information to a new sheet and store the original information on another sheet leaving the first sheet a table of information yet to be updated.
The attached workbook should make things clearer. The update button is the one in question.
View 9 Replies
View Related
Feb 2, 2010
I would like to summarize all "yes" respose contained in 15 tabs. See the attached.
I would like results to be returned to the "summary tab" when user answer "yes" in the signficant column in the "process activity 1 through 15" tabs. If the answer is yes, I would like to pull the process name, aspect and impact detail.
View 14 Replies
View Related
Sep 3, 2013
Is it possible to download search results in Windows 7 to an Excel spreadsheet? I searched for file names that started with a specific alpha character in a specific folder using Windows 7. The results came back with several hundred file names. I'd like to create a spreadsheet with columns for the file name and the sub folder name that contains the file. Is that possible?
View 1 Replies
View Related
Oct 2, 2009
I have two worksheets in worksheet 1 I have a bunch of data and I want to be able to filter out to only include relevant results.
Eg. If I search for 'Dog' I want search column A in another sheet and find all full and partial matches then display the entire row of each of these matches.
View 6 Replies
View Related
Nov 6, 2006
I have to extract all the entries that have certain words.
The worksheet has 600 rows, setup like
Column A=unique document number (never repeats)
Column B=Document Titles (some repeats, though the documents that are the same are not titled the same, though they have certain keywords in like documents)
Column C=Document Types
I want to search Column B for all titles containing the word/text string WOR, and then copy the row of A, B, and C when WOR appears in Column B, and put it into another worksheet.
Now obviously, I can do a "Find All" for WOR on Column B, but I can't cut and paste the results into another worksheet.
I prefer a simple formula, cause my VB and Macro skills are pretty non exsistant, though I will learn if that is what it takes.
View 11 Replies
View Related
May 14, 2012
I want to create a searchbox in Excel which will locate text in a massive amount of data, for example, if a user types into the box....
"123"
I want the search box to filter the spreadsheet using the autofilter from cell B3, thus filtering out all results that are NOT "123".
Currently I have a button to press which brings up the CTRL + F screen, but that isn't exactly what is required in this instance.
View 6 Replies
View Related
Mar 7, 2014
At the end of a long macro, I want to search the value in Column A and if value = 0 then it'd return the values in adjacent cell to the right in a msgbox.
All that is returned is the text I inputted.
What I have so far (I picked it up on the internet):
Code:
Sub Macro2()
Dim msgaddress As String
For Each c In Range("A:A")
If c = 0 Then msgaddress = "Portfolio Deal with invalid ID:" & vbNewLine & ActiveCell.Offset(0, 1).Value
Next c
End Sub
View 6 Replies
View Related