Excel filter to new sheet - excel

Looking for a way to automatically filter on a specific column and then for each filter in that column create a new sheet with that data.
I tried looking at using a pivot table and that works to some point if I filter my report on said column and then 'show report filter pages' but using the pivot is not the same as simplifying filtering the data...
Lets say I have 10 columns and 15 rows I specifically want one 'sheet' for each filter result based upon a filter of column H. So if there's no duplicates in column H I'd expect 15 new sheets.

What I do in that case usually is either make a pivot just to get all unique names or I copy-paste (value) the column on a separate column, call RemoveDuplicates() and go through that list.

Related

Excel Creating New Sheet with Summed Data from related sheet

Lets say I have the following on a sheet.
By some means, I want to either replace this, or preferably, create a new sheet, with the following data. Notice, that PO# is out of the picture, and a summation is done on rest of the fields. Is there a way to easily do this?
The end result has to be data in excel grid like below (preferably on a new sheet). This can possibly be some macro or some other technique I can use to easily create this....
You can easily do this with SUMIFS() or a Pivot Table.
For SUMIFS() the below equation will give you the sum for W.PS123 Product A. Modify as needed for your other criteria by swapping AR and product number (both housed in quotes in below formula, you can also set these equal to a cell range that contains desired criteria).
If you have a set number of "ARs" and Product Numbers, you will only need to build this table once and the equations will automatically update as your raw data changes.
=SUMIFS(C:C,A:A,"W.PS123",E:E,"A")
Alternatively, you can build a pivot table and just refresh this every time your data updates (or create a worksheet_change macro to refresh the table automatically when your data changes).
To build your pivot:
Highlight your table array (In your example, Col A-D)
Insert > Pivot Table
Drag AR to Rows
Drag PRODUCT to Rows (Below AR)
Drag QTY to "Values" and change the field to "Sum" rather the default count
Format to taste

On an Excel pivot table, is there a way to apply different filters for each column

I have a pivot table that I have to change the filters 6 times to get all the totals I need. Can I sum each column based on unique filters for each column?
Just copy and paste the PivotTable 5 times, and change the filters on the other ones to get what you need. Or use the GETPIVOTDATA function to reference the 6 parts of a master pivottable that you want values for.

How do I add a blank subtotal row after each different value in a specific column in data that has been filtered with an advanced filter?

I am getting an Excel 2010 Workbook with chunks of data. There are a variable number of blank rows between each chunk of data. Here's what I do with the data using macros:
I copy the data from the source workbook into a workbook with my macros.
I remove the blank rows.
I then sort the data with 4 sort criteria.
I then use an advanced filter to extract 6 of the 26 different types of data.
I then use the VBA code within a macro found here: How to automatically insert a blank row after a group of data to add a blank row after each unique value in Column A, but I am getting numerous blank rows as it appears to be adding a blank rows based on the original data, not the filtered data:
What I need is a way to add a blank row after each unique value in column A after the data is filtered to add sub-totals and counts.
You might copy the filtered data to a separate spreadsheet tab then do the insert.
Otherwise you will have to use the SpecialCells property mentioned above, which is much more complex.

How to filter a list in an excel sheet

I have to filter below given excel sheet by a list of 'ID's.
My excel sheet contains thousands of 'ID', in which i have to filter only a particular list of 'ID's. It will take time if I enter values in the list one by one, now how can i filter the list of 'ID's at a time? For example in the above excel sheet how can I filter the list {3,4,11,19}?
You can use Data > Advanced Filter to filter the list. You need to enter the filter criteria in one or more cells. These cells must have the same column header as the column you want to filter on. Typically, these filter criteria cells are created in empty rows above the table, but they can be anywhere else on the spreadsheet.
Click a cell in the data table, select Data > Advanced Filter. Select the filter range and tick to filter the list in place.
The result looks like this:
Note how the blue row headers indicate that there are hidden rows. You can clear the filter by hitting the "Clear" button on the ribbon.
In general you wouldn't be filtering on a list of ID, the whole idea of ID's is for a unique identifier for each row of data making it unique from each other.
You would normally have other columns of "category", "sub category" etc to make the data meaningful.
But saying that , you can use vba to allow you to enter a list of numbers to filter for you.
Create an input box where you enter a list of comma separated values
use vba to create an array of these numbers ,
then set the auto filter with
Criteria1:=Array(var1,var2,var3,var4,etc, "=")
The drawback of Advanced Filter is that you can't display the filter or update it. Each time you want to update it, you must define the Advanced Filter from scratch.
Another solution (which also has some drawbacks) is to create a new filtered range with a formula like this one (inspired from this one-column solution):
=FILTER(A6:D25,NOT(ISERROR(MATCH(A6:A25,Sheet1!A1:A4,0))),"")
Example:

Trying add up values but have multiple entries

I am trying to look up the value in one column and pull the number from another column.
Of course, I could use the simple V-lookup or Match.
However, the first column of data has multiple entries that are the same. If I Vlookup it is just going to pull the first number in the second column.
I need to pull each number from the second column and somehow add them together. Despite the fact I have multiple entries.
If there is a way to consolidate the multiple entries in 1st column while also summing up the numbers in the 2nd, that would be great.
I would recommend a Pivot Table. To create one, select a cell in your data range (which needs to have column names in the first row. Choose Insert / Pivot Table from the Ribbon and select the New Worksheet option for the location.
In the Pivot Table list on the new worksheet, drag the name of the first column to the Row Labels box and the name of the second column to the Values box. The name in the Values box should turn to Sum of <2nd column name>.
The Pivot Table will now show a sorted list of the column 1 values and the summed values of column 2. In the example, you'll see that
Does SUMIF do what you are looking for?

Resources