Copy / Filter Data Based On Data In Column Occuring X Times
Mar 7, 2008
I have a excel worksheet with the following columns: First name, Last Name, Email address, domain of email, product type, date registered. The list consists of about 50,000 entries. I want to sort the list by the domain of email(which I am able to do already) Once this is done, I want to find all instances of where a domain appears at least 10 times on the list(such as webmessenger.com appears 40 times, so I want to get that data).
For those instances where the domain appears at least 10 times, I want to pull those rows out of the intial list and put them in a new list(the new list will be sorted by domain and will only have people who have a domain which appears at least 10 times). To make this a bit more clear, The initial list I have is a list of people who registered to use the software my employer makes. We are trying to locate companies which may have many people using our consumer version of the software. When there is a large amount of people in the same organization using our software, it would benefit them to upgrade to the enterprise version due to enhanced managment features. By running this filter, I can see which companies have at least 10 users registered to use our software. Of course I will remove any Gmail/yahoo mail/msn/hotmail... pretty much any public email domains and just leave the ones that are obviously corporate emails.
So far, I think it probably has to be done with a pivot table... I was able to get a table that tells me how many instances occur from each domain, but I cannot get it to display the actual data(it just says IE. company.com 200, yahoo 120, etc... I need it to show me the 200 rows of company.com emails and extract them to a new sheet so that I can then follow up with company.com and see if they are interested in the corporate version.)
I am trying to get excel to search a workbook/(or worksheet if easier) for a matching unique value and fill in its associated data. My first workbook has the SKU (A) filled in but not the UPC (B). My second workbook has both the SKU (A) and the matching UPC (C) filled in.
I need to take both workbooks/(worksheets), compare the SKUs, and if a matching SKU is found, extract the UPC from Workbook 2 and fill in the UPC field in Workbook 1, and if no UPC is present in Workbook 2, then it leaves the cell in Workbook 1 blank.
I have a lot of data to filter / sort. I want to initially to create a filter for a column of data - which has the format similar to hierarchical paths to files. The data is a mix of text/numbers. e.g.
Doing an alphabetical sort of this date would return the following order. As you can see while each strings in unique - there are many instances where they are simialr - if you ignore the unique numeric values at the end of the string.
So what I want to do is to create a filter for the strings - but ignoring the numeric bits at the end i.e.
The strings are obviiously of varying length and the number of hierarchical paths is different, so I can't split string on "/".
Similarly folder paths names can contain "_" so can't split string on this either.
As I don't know how many "/" or "-" instances there will be in the string I don't believe I can use the find function. Also as the amount of number will be different i don't think I can use =right(a1,X) either.
I may be able to search for the pattern above - as this is probabay unique - so maybe it's something like the following pseudo code:
Function GetString(txt As String) As String With CreateObject("VBScript.RegExp") .Pattern = "reg_d+(_)+d+//d" GetString = .execute(txt)(0) End With End Function
If I do require VBA code - how do I then use this for creating a column filter? Or will I have to extract the filtered data first from the column (and its associated row data) into another worksheet to use?
Once I have the filter in place I want to create tables using the filtered data - so for example each column value above has a lot of associated data values in each row e.g
I have an Excel Spread Sheet that lists all of the people who have been issued Keys in your workplace, so the row has multiple information columns (Name, Department, Key Code, etc). One row is titled "Left Workplace" and you can select either a Yes or a No. Based on that selction I want it to copy and paste into a different spreadsheet (Either Inactive - if "No" is selected or Active - if "Yes" is selected) What is the best way to go about this?
I am new in Excel. Recently I have to copy a cell data from Pivot table (example value in B1 cell) to new sheet by this week. My problem is this value could move to C1 by next week & so on. I try to use the column label instead of hard coding like cell column name (B1).
I would like to copy and paste the values from a worksheet (HS-Detail) in a file to different tabs depending on the value in column A (Regions). I have a macro that works but it pastes the formulas and it takes quiet a while to run due to the number of records. How can I alter this to paste just the values and speed up the macro?
i need a macro that will copy data based on the column headings, i have two worksheets, the first worksheet is the raw data and second worksheet will be the results sheet, the issue is the headings i have in raw data is different to the headings i have in the results sheet and the heading will not always be in same column in the results sheet, so for example in Raw data i have heading Quantity and in destination sheet i have heading Units, so the macro should copy the data for quantity in sheet raw data and paste to sheet "Results' under heading "Units". The header row on both sheets is row 3. I do have more headers but if I know how to do one then i can apply the same method for the others.
I have a workbook with 2 worksheets being used. Sheet 1 has the months of the year starting with Jan in A1, Feb in B1 etc. On Sheet 2, I have a column of information. The first cell in the column eg. B1 has data validation list based on the months on Sheet 1. The information in the rest of the colum on Sheet 2 needs to be copied to the relevant colum on Sheet 1
I have a macro that copies three sections of data from a word document and pastes it within the Excel worksheet. The column of data is pasted in a single column (data to be space-delimited and evaluated later), and what I would like the MACRO to do is separate the three sections of data based on the starting and ending values of the section and place them in different columns.
Section 1 : starts with the word "Team" Section 1 : ends with the word "City"
Section 2 : starts with the word "Location" Section 2 : ends with the word " Date"
Section 3 : starts with the word "Member" Section 3: ends with the word "Age"
So section 1 would be pasted into cell C1, section 2 pasted into G1 and section 3 pasted into J1.
Each section will have vary in number of rows between the starting/ending values, so to cut and paste the section based on the starting and ending value is vital.
I need to copy all the work sheets into one single work sheet (mastersheet). The source work sheets are having same column structure. The condition which i need to take care of is that after column 3 if at all there is any data till column 10 then in the destination mastersheet these should be copied in different rows with first two columns repeated. I need to do this using VBA macro.
I have a workbook with many sheets of similar but not identical data. I need to extract columns from each sheet based on 5 header criteria and paste them to a single sheet. Each worksheet contains these 5 criteria.
I've been working with the VBA script I've pasted below. It's grabbing the 5 column criteria that I have in sheet 12, and comparing them to sheet 1 in the workbook, then copying them to sheet 12. This much is good, but I need the script to also return the data from the other worksheets as well. I've tried modifying the script based on other loop functions in other scripts I've found, but I'm not having any luck.
I have a sheet that contains the following columns: Invoice, Document #, Date, PO #, Part #, Part Description, Quantity, Net Amount
Based on the quantity in the row I need to copy the row, and insert it n-1 times. So if the quantity is 5, I need to copy and insert the data below the original row 4 times for a total of 5 rows of data.
I plan on firing the macro with a button as the data will change month to month.
Is there a way to easily filter the data according to the products' "index %" of a given month and then copying all data (including name, price, index%, and index value for the whole year) of those deviating from 100,0% to a new sheet?
I tried this myself with auto filters but the layout presented some problems. The sheet is created automatically by another programme, so the layout is what it is.
I really hope someone might have a solution for this since I need to sort through these sheets, with thousands of products, every month by hand!
Is there a way to filter column A but ensure it includes multiple lines of data in a different column.
I have attached an example of what I am looking for:
I need to filter by community but keep all the information listed in columns, B, C, & D. So when I filter to Thunder Bay I would still see the 5 members listed in column D.
I realize the easy solution is to fill all the empty cells in column A to pick up the data in the other columns, but I do not want to Fill all the empty cells to include the name "Thunder Bay" (not the look I want for this spreadsheet).
I have a spreadsheet. This has columns begining with A to S (with data in it)
It has rows beginning on row 5 and goes down to 85 but it gets bigger every day.
I want to create a macro with several phases
Phase 1 - Select the rows I specify, ie pop up box to decide on the rows Phase 2 - Filter down and select the rows in this selection where column K has a value (unselecting the rest) Phase 3 - Copying Columns A, B, D, E, F, K, from the selection Phase 4 - Pasting these columns into A, B, C, D, E, F, of the sheet the macro sits on....
I have a list of items in column A. And a "flag" in column B. I have attached a small sample. What I need to be able to do is "Hide" all the items in column A where there are no flags for that item in column B. This I can do. The problem is that if a flag shows for an item, I want to show ALL of the rows containing that item, even if there are no flags for some of them, and hide the rest.
I have 2 date values in excel spreadsheet ( i must use it by the sheet) and i want to flter table by the date column and AutoFilter, when the start date and the end date will be taken from the sheet itself.
but when i defined date variable like starta and edit the filter (Criteria1:=">=starta") it didt work (the value was starta and not the date in the starta) how to edit it?
sub abcd Dim starta As Date, enda As Date starta = Worksheets("periods and options").Range("a1").Value enda = Worksheets("periods and options").Range("b1").Value Sheets("DATAF").Range("a1:p1325").Select Selection.AutoFilter Field:=1, Criteria1:=">=starta", Operator:=xlAnd _ , Criteria2:="