Excel - Duplicate values in Pivot Table? - excel

I am pulling my hair out here, For simplicity sake, here's the problem.
Column A has many IDs, some are duplicated. The Pivot table uses this ID Source sheet, and creates a table......now for some reason it shows duplicate IDS, instead of displaying unique IDS as a whole (like pivot tables should?).
I re-created another Pivot Table, thinking it was an issue with how its setup. The same duplicate IDS show. I thought perhaps, the duplicated IDS, have a space after there numbers, creating duplicates in the Pivot Table. So I ran a =len() on all IDS, there all the same length, no spaces......
I am lost right now as to why this pivot table is display duplicated IDS, when it does for some, and not for other duplicate IDS in the source sheet.

How many duplicate IDs are showing in your pivot table for one unique value in the ID data set? If its just two, then its possible that some of your IDs in the original data set are stored as text with a leading single quote mark. In this case, setting the entire column as format cells > general wont change them. Furthermore, the LEN test wont include the extra prefixed quote mark...
If there is a green arrow in the top left corner of the cells, select them and convert to number from the drop down...

Related

Match Identical Entries in Two Excel Tables

After a series of macros I am left with two tables. One of stock on System 1, and one of stock on System 2. The lay out is as follows:
Item-Id | BatchCode | Stock
My question is: Is there any way to match up entries? i.e. If the three values match, do something (highlight, delete, hide)
My goal is to isolate the entries where the stocks don’t match etc.
Both tables are of different sizes and probably contains something the other does not.
Another issue is that there can be multiple identical entries in each table, which breaks Match values from two tables in excel Vlookup solution.
If this is a one off procedure, and you just need the final list of unique entries:
Copy all the values into a single list.
Highlight all three columns of data.
Select the "Data" tab.
Click "Remove Duplicates".
This will remove all the duplicates, leaving you with a list of unique values.
It will also tell you how many duplicates were removed.

Restructuring data in excel

I am trying to condense data in a specific way. I want any occurrences of the number 1 in each column to show up as 1 (regardless of how many times it occurs) with the corresponding site, in the corresponding column. Some sites occur multiple times in the original data, and I want to make it so that only one of each unique site shows up in the resulting data table with a 1 for the corresponding column if there any 1's in the column from the original data.
I would think it would be a vlookup function, but I have tried many different things and I am really stuck on this.
Image of original data and what I am trying to do:
Thank you
This assumes that your data set only contains 1 or blank and this approach uses a Pivot Table with MAX function. Below are details in case anyone doesn't know Pivot Tables.
Select a cell in your data and insert Pivot Table. Note, I added a title for column A, as you need that in the Pivot Table.
Click in the created Pivot Table and the PivotTable Fields dialog should pop up. If not, right click in Pivot Table and select Show Field List.
Drag the Field names (Code, a, b,& c) down to the appropriate blocks below. (Values under Columns will be created for you.)
Click on the drop down arrow next to each field name and select Max. That will rename it to "Max of ...". If that bothers you, then you can type the name you want into the Custom Name field. Note, it will not let you type the same name as the field name, eg a, but it will work if you put a space in front of it.
Given that the Pivot Table would be a lot of work for a large number of columns, here is a formula based approach. Put this formula in cell G2, then drag it down and across to fill your new table.
Note, you will have to populate all codes that you have in column F. And if any new codes are added later you will have to keep this updated. One of the advantages of a Pivot Table is that it will do this for you.
I know that you won't be putting this in these cells, so adjust accordingly. In fact, I would recommend this be in another sheet.
=IF(COUNTIFS($A:$A,$F2,B:B,1)>0,1,0)
COUNTIFS($A:$A,$F2,B:B,1)
This will count each occurrence when the value in column A matches your code $F2 AND the value in column B equals 1.
If that count is >0, then you know that at least one match was found and the IF will return 1, otherwise 0.

Deleting duplicate rows beyond the second in Excel, based on a single column

I have an Excel spreadsheet with duplicate rows, and I want to keep at most two for a given user. How can I keep two duplicate rows, then delete all the additional rows if they have the same value in column C?
Here's an example - I want to keep the two highlighted rows, but delete the rest:
I'm going out on a limb and assume you are talking about excel since there are no application or language tags associated with your inquiry.
After selecting your data, use Data ► Data Tools ► Remove Duplicates. Choose the columns that define a duplicate value. Click OK.
Remove duplicates removed from the bottom to the top so you are left with the records that were closer to the top.

How do I automatically add rows to a table in excel to make data match other table in same sheet

I am currently comparing data from two different sources in an excel spreadsheet. My left table is missing a few entities and because the tables are sorted the same way. I have been simply adding rows to the first table to make the rows match up.
Ill use this image to describe what I need a little better:
Consider these two different tables in the same worksheet. I would like a row to be inserted automatically above ID-5 in the first table to make it align with ID-row 5 in the second table. I would also like to do the same thing for ID row 8.
Is there an automatic process I could evoke in order to add rows until the data matches up?
If the right-hand pair of columns is comprehensive (say starting in C1), you might put, in E1 copied down to suit:
=IFERROR(INDEX(B:B,MATCH(C1,A:A,0)),"")
This does not add or delete any rows but should match the left pair with the right pair. If the right pair is not comprehensive list of IDs then append one ID column to the other and delete duplicates on that column to create a complete list.

Reporting Services 2005 Hide Columns Only in Certain Table Groups (eliminate white space)

I have a report (rdlc) that has a data set that has row grouping based upon certain field values.
It is set up to appear as separate tables for each grouping.
I now have a requirement to display a column for only one of these groupings.
For example, if value = a then show a column in the grouped table.
If value <> a then do not display this column.
I have tried several visibility techniques but cannot get the column to show in only one grouping.
The closest I got was to show the column in the required grouping, but it left white space for the column within the other tables.
Has anyone successfully tried anything similar?
Thanks for any and all assistance!!!
A table in SSRS ( and many other systems) must have the same columns for every row, and the same rows for every column. You can merge some of these, but that won't accomplish what you want: changing the number of columns for only some rows of the table.
I would separate this into multiple tables. Use the filters property of the different tables(tablixes) to filter each table to only display the appropriate rows if you would like to keep your current dataset.

Resources