Remove Duplicates Excel - From Each Day - excel

I have a spreadsheet with columns of the following records:
Caller ID (Customer's number each call came from)
Date (the dates are when the calls came in since January 1 2017)
How can I efficiently remove duplicate Caller ID's within each day?
If I simply use the Remove Duplicates tool, it will remove duplicates across the entire year so far.
So I pretty much want to remove instances where a customer called more than once in a day.
Here is an example of the data.
How can I make it so only the first record from each day shows?
My actual sheet has over 100k rows

Why delete the duplicates? Just create a pivot table and it can show the unique values and a count of the duplicates.

Remove duplicates tool should work, Are you sure you have only those 2 columns (number and date) ticked in the Remove duplicates tool?
If not, check the date format

A quick and dirty solution:
Assuming the data is sorted (ascending) by the date to begin with, you could do a primary sort on date and secondary sort on phone numbers. In an empty column, enter the following formula =(b2-b1)+(c2-c1) (where phone is column b, date is column c and row 2 is your first row of data. Copy and paste to last row of data. Now filter that column for 0 only and then hide or delete those rows.
Now if the data wasn't already sorted by date, and you need it restored to the original order, you could first add a column for a numeric order (i.e. 1,2,3) with formulas. First row (Row 2) of data is a 1, next row is a formula (=a2+1) and copy and paste that to the last row. Now when you run the above process, you would delete the rows with zeroes, then run a final sort on Column A to get back to the original order.
Hope that helps. If this is a one-time thing that should suffice. If not, a macro could do the same thing and shouldn't be too hard to write. Or you could leave the extra columns in place or just hide them, for future use.

Related

Appending keyed row values in column chunks in Excel

Problem: I have multiple rows with unique organizations and if a unique row's column reaches the second name/last/email I want those values (in green) to be appended below the first (in blue) as seen in "what I want". Some rows may only have data up to email_1 and others may have both (up to email_2). I've tried looking for solutions but I can't find anything near what I need.
I can solve this with python but I'm trying to use excel formulas only. Need a little help! Thanks!
If your column maximum limit is upto email_2 means columns reach upto email_2 with unique row then i can help you in this regards using formula.use following steps.
paste first_2, lastname_2 etc column in above first_name, last_name etc.
2.in unique rows first column "Org". use if function to check first_2 is avaliable or not.
and if not there then leave it blank and move next row
=IF(IF(LEN(F5)>0,B5,B6)=B6,"",B5)
3.for getting data of first_2, last_2 use vlookup with match formula are as follow
=IFERROR(VLOOKUP($B9,$B$4:$H$8,MATCH(C$3,$B$4:$H$4,0),0),"") and after drag and drop all formula

How do I sort a spreadsheet by dates from different columns?

I have a a spreadsheet that contains a number of deadlines, as well as columns indicating whether the activity has been completed. I want the sheet to sort itself by "the next due date" which will come from a different column for each row.
For example, row 3 might need to be sorted by the date in column H, whereas row 2 might need to be sorted by the date in column J (since 2's colH activity is completed).
More specifically, a row might need to be sorted by its "45N" due date; once the 45N is finished, I'd want it to be sorted by the "45R" due date.
One option I read about is to create a 'dummy' column after all the data and populate it with the "sortBy" date for each row, and then simply sort by this column (and maybe delete it afterward). I think this would be fairly straightforward, and I have the conditional logic I'd need.
Is there a way to do this in VBA without populating a column? Just sort of saving a variable FOR EACH ROW in VBA, rather than making it a temporary entry in the spreadsheet itself, and then performing a sort on that?

Return last date something was entered into one column with criteria from another column

I'm working with a set of data in excel. Data is entered into rows for items specified in columns. The first column contains a date. A cell in the same row of one of the columns contains the name of a person and in another cell in the same row but different column may contain a number larger than zero (or it may be empty).
I need to create a formula which returns the date when a number larger than zero was last entered into that column for a specific name. This is a "living list" which keeps on growing and the same names appear in different rows, sometimes with a number in the column a mentioned and sometimes not.
I found an old thread on this site on a similar subject which got me as far as knowing the date of the last entry containing the persons name but I'm still not able to configure it to show me when that specific person also had a number larger than zero in that column.
Here's the thread: How to get the newest value from a column with conditions
My current formula looks like this:
=INDEX($A:$A,MATCH(MAX(IF($G:$G=Sheet7!C5,$A:$A,0)),IF($G:$G=Sheet7!C5,$A:$A,"")))
CTRL+SHIFT+ENTER
Column A contains the dates
Column G contains the names (and "Sheet7!C5" is a reference to a name)
The value column I need to add to the mix is column AY
I feel there must be a simple solution (a small add on to the formula) to solve this but I always end up with an error.
Thanks in advance :)
Edit: Here is a simplified example of the data entry and output list needed.
For this you need to sort the date DESCENDING and format the table as Excel Table
Edit: you can sort the date ascending. See explanation at the end.
Using your example, then the formula will be
=INDEX(TableData[Activity A], MATCH($B14, TableData[Employee initials], 0))
This works just like the usual VLOOKUP or INDEX MATCH, fetching the first date on an activity matching the employee initials.
You can use VLOOKUP, but you'll need to dynamically name the range of each columns.
Edit: Just today I found an interesting behavior of MATCH when it found multiple matching values. If you use 1 instead of 0, then it will fetch the last matching value on the list.
So, you can use this formula instead in ASCENDING table.
=INDEX(TableData[Activity A], MATCH($B14, TableData[Employee initials], 1))

Aligning non-identical cells in Excel

I have a question regarding aligning of two columns in Excel.
My first column (A) comprises of ~1000 emails, each one in its own cell, in alphabetical order.
My second column (B) consists of emails, ~900 of them, each in its own cell, in alphabetical order. All emails contained in the second column are also on the first, but there are ~100 from the first column that do not appear on the second. I would like to align the emails of the second column, so that each of them aligns with the original email in the first column.
Given that the cells are never completely identical due to special formatting at the end of each email in the second column, is there any way to align each 2nd column cell to the 1st column one?
Please see the link below for clarification and format of the second column.
(http://postimg.org/image/qvolipazb/)
You can solve this with vlookup.
insert an extra column which will take just the email address out of
your col B
populate with a function such as =LEFT(b8,FIND(",",b8)-1)
Use this as an index for vlookup

Removing opposites from Excel

I am trying to figure out a way to remove values that have a net result of zero. For example I have data that is 10,000 and -10,000. They are linked to the same person though not the only transaction linked to a single individual.
Is there a method to remove both of these rows from my Excel document?
Here is a the kind of data I'm looking at
And I want to remove all but the last row as it is the only unique one.
If you create a helper column with =ABS(A1) copied down and then sort on ColumnB, that helper column and within that on ColumnA - you should end up with sets as you already have pairs. Then in another helper column Row2 and copied down:
=IF(OR(A1=-A2,A2=-A3),"#","")
should flag 'equal and opposites' next to one another. Remove those and repeat until no more flags appear, if you have multiple instances of equal and opposite values. Beware however where the last value for one Cust # is equal and opposite to the first value of the next Cust #.

Resources