I have an xlsx sheet (using MS Office 2010) with around 10-15K rows and multiple columns. I want to consider two columns to filter this data but need data from all the existing columns. Sheet looks like
The id column can have duplicate records. The rule I want to apply is:
1) For the set of duplicate ids in column id, select only 1 row which has highest value in corresponding timestamp column.
2) So as result this should give only distinct ids with hisghest timestamp among it's set of duplicate values.
3) Considering the data in the sheet, the result should have only two rows that I have filled in with yellow color.
Can you please help me on how to setup rule to do this in excel?
Sort by id then timestamp (descending). Add a new column after B and use
=COUNTIF(A$2:A2,A2).
Filter that column to show only 1's
Do a descending sort on Columns A and B and then use Remove Duplicates on Column A only. The highest values should be the first found, and anything else will be deleted.
Without sorting for a Range from A2 to A24 you can use:
=B2=MAX(B$2:B$24*(A$2:A$24=A2))
If you have any questions, just ask ;)
Related
I'm new to excel and I came across this problem.
I have a table with 2 columns one with the name of the item(the same name can appear multiple times) and next to it the quantity of said item.
What I want to get is the item which has the most overll quantity (keeping in mind that the object can appear multiple times in the table and have different quantities in each of the apppearences).
You didn't specify how you want to highlight the value.
Assuming your items are in column A and your values in column B.
Add a helper formula in column C to sum all the items.
=SUMIF($A$1:$A$100,A1,$B$1:$B$100)
you can use conditional formatting to highlight the highest value by adding a rule that uses a formula and entering;
=B1=MAX($C$1:$C$100)
It highlights every entry of the item with the greatest value.
To return the name of the item with the highest value you can use;
=INDEX(A1:A100,MATCH(MAX(C1:C100),C1:C100,0),1)
There are 2 parts to this formula
=INDEX(A1:A100,MATCH(MAX(C1:C100),C1:C100,0),1)
The match part finds the row number of the highest value and the Index part returns the value in column A for that row.
This solution may not be ideal if you have a huge amount of data so you could also try a pivot table and sort it highest to lowest.
The first 2 columns repeat data in my data export dump tab. I need to get the number of positions for a unique job reference. How can I create the third column?
In C2 put the following and drag down for as many rows as required
=IF(COUNTIF($A$2:$A2,A2)>1,"",B2)
I need VBA code that will delete all rows with column A equal to "XXX" if column B is equal to "YYY".
Example: I have a spreadsheet that looks like this: column A has multiple rows with the same value but the value in column B is different for every row. I want to delete all the records with the same value in column A if column B has a specific value.
This is something that would be very easy to create using the Macro record feature of excel and then modify the code to fit the specifics you are needing.
I have a spreadsheet with 40,000 products in and I want to remove a list of 800.
Each of the items have a unique ID for example the ID numbers range from 2000 - 30000
How do I do a quick find on each individual unique ID and then remove it from my product table?
Column A is my list of 40,000 and column X has my list of 800 which I need to delete from Column A...
In a column next to your big table, text for exact match of value in A as compared to the whole range of values in X:
=ISNUMBER(MATCH(A2, X:X, 0))
and apply auto-filter to TRUE - these are the rows that you can delete (after double checking).
In a column next to your big table, test for exact match of value in A as compared to the whole range of values in X:
=IF(COUNTIF(X:X,A1)>0,"Delete","Don’t Delete")
and apply auto-filter to "Delete"- these are the rows that you may want to delete.
I have a data table with 8 columns and i want to know if anyone can help me come up with a formula to get the name in the first column if i enter a value into the columns (3,4,5,6,7,8).
I want the name from the first column to appear in another table on another sheet where only names appear where data is in the columns (3,4,5,6,7 & 8)
Try this:
=IF(OR(Sheet1!C2<>"";Sheet1!D2<>"";Sheet1!E2<>"";Sheet1!F2<>"";Sheet1!G2<>"";Sheet1!H2<>"");Sheet1!A2;"")
You can use C1 = 1 .... if you prefer.
And C1,D1,E1... have to be replaced with your columns.
Also Sheet1 have to replaced with your sheet name
I would use a Pivot tables.
First create a new column in the existing table:
If you only having positive values then it is:
=sum(C2:H2)
If you have zero and negative values as well it would be like this:
=IF(COUNTBLANK(C2:H2)=6;0;1)
Then make a pivot table with the "TO/TA name" in the Row Labels and the new column in Report filter - where you then removes the "0".