How To Categorize List / Column Into Separate Ones By Finding Keywords
Jul 28, 2014
Say I have a list:
VB:
Something something apple
Something something orange
Something something banana
Something apple something
Something banana something
Apples woo
Apples And bananas
Something orange something
Something something apple pie
Something something vegetables
And I want to separate the list into separate columns/lists with certain keywords (e.g. apple, orange, banana) like so:
Apple
Something something apple
Something apple something
Apples woo
Something something apple pie
[Code] .....
The "multiple words found" part isn't a big deal (I'm not sure how I'd deal with it anyways). The "Unsorted" part is there assuming creating the separate lists won't remove the entries from the original list (which would then leave all the unsorted text).
I need to find 100 or so keywords in a column, I have the list but how would I search multiple keywords as there are 10k columns and it would take forver to search for them manually?
As you can see, the second column contains abstracts which I want to use to determine categories for each document (each line).
Categories are as followed : Diabetes prevention -> keywords : sugar, diabet*, insulin* Obesity prevention -> keywords : weight-loss, fat*, LDL etc. (5-8 categories)
To target one keyword, I found this formula : =IF(IFERROR(SEARCH("*diabet*"; $B3); 0); "Diabetes prevention"; " ")
What I would like to know is how to add more than one keywords in this formula.
I would also like to know, if it is even possible, how to put every categories in this column, so that i don't have a category per column ... It's hard to explain.
I want to have in front of each line the corresponding column. It means that the formula has to search for every keywords and select one or more appropriate categories.
I need to setup a macro that will search for a keyword in a list with about 21000 rows. When the macro finds the keyword it cuts the row out and moves it to another sheet. I'm having a few problems
1. I don't know how to make the function search until it can't find the keyword anymore, then move on to the next word
2. I can't get it to select what it finds it finds the cell but I don't know how to select that cell once its found.
Sub Search() ' ' Search Macro ' Dim keyword As String Dim x, y, z As Long For x = 1 To 53 Sheets("Test1").Select Range("A" & x).Select keyword = Selection.........
Macro - it is currently set up to find a specific text, and activate that cell. From there, the spreadsheet has data in 6 cells in the 6 rows below the active cell. What I need the macro to do is to identify the product based on key words in a range of cells: that is, if any of those cells contain the string "total", than the product type is total, but if "total" is not found, look for keywords such as "alpha" and "beta", to identify the product type. If its not a total product, then i want it to look for "productB", "productc", and so on with relevant keywords until the product is identified.
I think IF(ISNUMBER(SEARCH can be used, but I'm not sure how, and I'm not sure how to search all 6 cells (to make things worse, the number of cells vary, so I'm using the "find" function to figure out the first and last cell that contain data).
I have a spreadsheet that uses VB macros to calculate sums of cells based on the font color of the numbers inside. It used to be fairly easy going through each cell and "classifying" them by color, so that my macros can go ahead and sum the numbers in each respective color's cell... but now I have a huge amount of numbers and would like to automate the process somewhat. Here's an example using the A and B columns:
flight $400 hotel $150 hotel $130 meal $20 meal $15 flight $350
I tried using conditional formatting to automatically change the color of the adjacent cells based on the presence of a keyword such as "flight" or "hotel", but this change is only cosmetic, and doesn't actually change the font color (it is still the default black, hence why my color-summing macros won't work!).
I'm including a sample macro for what I use to color-sum my cells, but what I am looking to automate the color-coding process based on looking for keywords as explained above in my example. Here is one of the working color-summing macros (for red, in this case) if you'd like to use it as a reference:
Function SumRed(SelectedCells As Range) ' Adds the values of the cells where the font colour is red(3). Dim Cell As Object Dim x As Double
I have a list of Products in my Excel file, I am trying to put them into categories easily. So what I am asking is there a way to select all rows with a certain key word in them so I can easily paste them into my other excel file?
Running Excel 2003. I have a list in column B, of numerical codes. What I want to do is find the duplicates, and list the duplicates in column D. Is this possible?
I have rows of 10 keywords. I want the macros to compare the first row against all the rows except itself, then compare the second row against all the rows except itself, the third row against all the rows except itself, basically looking for duplicates...It will then record in a column for each respective row, the max # of duplicates found with another row..
For instance lets say I was looking at the 15th row, and it looked for duplicates elsewhere. It only found duplicates in the 4th row and the 5th row. In the fourth row, there were 5 keywords common, and in the 5th row there were 7 keywords common. Therefore the max # of common words is 7 for the 15th row, and that is what is recorded.
In addition the number of rows will probably vary it could range from 1 to 500. I included an excel spreadsheet that has visually speaking how this could work, maybe using COUNTIF. Basically it counts the # of common keywords for one row with all the other rows, pastes the count #s to the right, then finds the max of those count #s, copies the max into another column, then clears the count #s, and looks up the next row, repeats the same process. It is easier probably if you look at the attached spreadsheet to get an idea of what i am talking about..
I have two Spreadsheets, lets call it Spreadsheet 1 and Spreadsheet 2.
Spreadsheet 1 has a list of partial employee names in column A. Spreadsheet 2 has a list of 500,0000 full employee names in column A and their phone number in column B and address in column C through E.
Basically what I want to do is do a wildcard search for the partial employee name, so like lookup Spreadsheet 1' Column A's *name* in column A of Spreadsheet 2. Based on the number of matches. I want to insert that many blank rows underneath the partial employee name, and paste those matched rows there, then continue to the second partial employee name lookup and repeat the process.
I am trying to NEXT my way through a column of comments and highlight the cells containing the key words. Below is what I have put together, but I know it is NOT working correctly....
Currently running a macro which selects all the rows between two specific words and pastes the selection into another worksheet. However, it runs this search on the entire workbook, whereas I'd just like it to run the search in a particular column (column D in this instance).
This is the code as it currently stands:
VB: With ActiveSheet .Range(.Cells.Find("financial assets"), .Cells.Find("liabilities")).EntireRow.Select End With
I have data in which there are important keywords within a row (e.g.,# Message: FacesSc0_1) that are 'boundary markers' for data that is relevant to me. What I want to do is to select the data in the column between two such keywords, replace them all with the same specific value, and delete the other rows.
I would like to replace the values in the cells between "# Message: FacesSc0_1" and "# Message: FacesSc0_1" with the value 1, delete the values between "# Message: FacesSc0_2" and "# Message: FacesSc0_3", and replace the values in the cells between "# Message: FacesSc0_3" and "# Message: FacesSc0_4" with value 2. The resulting column would be reduced to this:
In column A I have 50,000 cells, each containing 1 to 10 keywords. For example A1 = "jobs" A2 = "jobs in milton keynes" A3 = "it jobs in milton keynes" A4 = "sales jobs in milton keynes" A5 = "well paying brickie work in spain" etc etc
At first I was trying to find out the most common keywords in column A, and I used the following code to do so
I'm evaluating the effectiveness of a keyword list we use to identify certain, high priorit,y medical situations from a string of text.
So, I have a column on a sheet of data (EIS Report!"B:B") in this case, and a seperate column on another sheet with keywords (Keywords!"A2:A47").
I use the formula ={OR(NOT(ISERROR(FIND(keywords!$A$2:$A$47,$B2))))} to identify if any of the keywords exist in the string. This works well but I would like to improve my work in two ways:
1 - Identfiy, in another column on the EIS report sheet, which keyword it is that's been found within the string, 2 - On the keyword sheet, add another column of words, which if found within the string, would act as an exclusion.For example, I might use "STAB" as a keyword to look for "Male stabbed" etc, however might want to exclude "STABBING" to stop the solution triggering on "STABBING PAINS IN ABDO"
I have 10 very large workbooks that are all setup in the same format. In column Z is a numerical value from 1 to 83. I have been trying to filter the sheet and then copy one at a time from 1 to 83 but that takes a LONG time especially when there is 10 workbooks to do.
Is there anyway I can run a function or macro or something that would just automatically look down the column Z and put each row into a it's own workbooks?
I have attached a sample of what the workbooks look like right now.
What I want is to get the proper category for this number depending upon there digit for eg. number starting with Z and of 8 digits belongs to group A number staring with Y ending with 5 and 10 digits belong to group B number ending with A and which does not starts with any alphabet has 8 digits belongs to group C. similary ... A user need to just key in the number, press tab (or any other button) and group for that number must be displayed (depending upon the compostion of that numbers).
What I can think of is to first seprate each digits from the given number, verify it and then filter them through the groups to get the final group.
I have a report which is pulled on a daily basis. I need a macro or a code which searches for the day, one day before the present day, and then custom "Current Day Document Count In" column such that it does not contain "0" and then copy the entire content and then paste in the second sheet. This should be repeated for two days before the present day too. I have attached the spreadsheet, where the first one is the report, second one is where I need the output to be. I have also attached one more "output" sheet to show how the report should look like. I tried to Record a Macro which sticks to the present number of cells, but cannot be used on a daily basis.
I have a excel file with huge collection of data. There are 5 coloumn. 1st is for Business name 2nd. Region 3. Town 4th. Telephone No and 5th.Category.
Now I want to insert category name automatically in that Category Field for each business. There are 4 type of business.
I have two lists of product data, one for buyers and one for sellers (these are listed as A, B, C). The product names are not exactly the same (Eg Playstation and playstation three should be matched), I would have thought using the FuzzyLogic add in to match these would be the way forward! I need to rank the sellers by how many of their items appear on the buyers list
I have a problem using the if formula with comparison operators. I have a range of fields for geographic areas and the values in these fields are a percent. I want to categorize the data based on thier value. For example:
If the value in the cell is between 0 and 9.9 percent, I would like the catagorize this as a "1" and so forth.
Using the if formula I know how to obtain an answer if the condition is exact -if(A1=0:1:A1) but I would like to enter a range of values for the comparison such as -if A1 is between 0 and 9.9 then 1, if A1 is between 10 and 30 then 2 etc.
My data has a field for "Donor Type." There are about 2 dozen types of and about half of them start with the letters CF. When I do a pivot table, instead of getting 2 dozen rows of data I'd like all the CF donors to be in the same row. Is there a way to do that without changing my data? Some sort of filter or grouping within the pivot table?
am currently a QE using the following data for my report generation: Date - Week - #Inspected - #Failed Want to pull data into ANOTHER WORKSHEET from this one wherein the format will be :
Month - #Inspected - #Failed
Indirectly want Excel to directly convert the data by input and categorize into Month in another worksheet (will be linked and would be great if according to the date it could calculate the week as well)...so if somebody inputs defects by date it should automatically cumulate into respective month.
What i have is a workbook that can have multiple sheets. Sheet 2,3,4 (if there are) are a continuation of sheet 1. First 2 rows of sheet 1 are headers and the last row of the last sheet (can be 2,3, 4....) is a footer. There are 14 columns (A-N) in each sheet. Col "N" has set status and col I has set names.
What i am looking for is a macro that can perform the following actions in the the set order: 1) deletes all rows where status in col N is "closed" 2) delete all rows where name in Col I is "Many" 3) if there are multiple sheets copy all data in 1 sheet once above 2 are deleted 4) I want to update cell A2, C2, I2, M2 & N2 with Hostel, Direction,Name,Flight & Status respectively 5) Create a pivot table with all data (Col A-N & Row 2 to last) in a new sheet and call it Summary - Pivot I can then manually select how the pivot will look
Currently i am going through all sheets manually and filtering data. Using excel 2007
On Sheet 1 I have a list of employee names (John, Bob, Ross etc...)in column A and in column B I have a list of employee bonus points (1, 5, 3 etc...). On Sheet 2 I have the same setup but the list of employees on sheet 2 is a lot longer than the ones on sheet 1, all employee names are on sheet 2.
I need a macro that will go down to each name on the list on sheet 1, column A, and copy the employee bonus points then go to sheet 2 and find the that employees name in the list and paste the bonus points in column B. This must be done until the last name on sheet 1 is found and all points are copied to their corresponding names on sheet 2.
I need to look up the name in E2 in the list in column A and if it matches then lookup name in F2 in list column b, if it matches then the corresponding number in column C is displayed in column G. If neither names are in the 2 columns the words"Not on lists" is displayed in cell in column G.
The other problem is one name is spelled two different ways I want it to look for both spelling before moving on to looking up the second name.
I started with this formula but I'm getting #N/A or "not on list" when they are on the list. I'm using ranges prod_sum is columns AthruC, Last_name is range BthruC. =IF(AND(VLOOKUP(F4,prod_sum,3,0),VLOOKUP(I4,last_name,2,0)),"not on list")