Author Topic: how to check umatched rows in excel  (Read 627 times)

0 Members and 1 Guest are viewing this topic.

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 488
how to check umatched rows in excel
« on: May 29, 2022, 04:37:31 am »
1. in excel i have around 500rows x 4 colums during one data looginf of one hour.
2. in next test, i may get 510rowsx4 columns.
3. Is there any way in excel to which new rows are added whose data doesnt match the rpevious stored rows?
each rows has 4 columns..
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10219
  • Country: nz
Re: how to check umatched rows in excel
« Reply #1 on: May 29, 2022, 05:20:28 am »
Do you mean remove the data does not match any other rows or just the previous row?
You can remove all duplicate rows using the "Data > Remove Duplicates" tool.
But i'm guessing you only want to remove dups that are adjacent to each other?

There's probably an easier way, but if you create a new column that is a concat of all your 4 columns (to make a unique column).
Then you can create another column that looks at this column and only displays something if that column is different to it's previous value using the =IF statement.

Then you should be able to use the remove duplicate tool on that new column and remove all the blank cells, which should be all the duplicates that are adjacent to each other
« Last Edit: May 29, 2022, 05:22:34 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6703
  • Country: ro
Re: how to check umatched rows in excel
« Reply #2 on: May 29, 2022, 06:31:32 am »
Log all rows, then create a pivot to show only the unique entries.

A pivot can be used for other purposes, it works with multiple columns, but if you want to look for unique combinations of all the 4 columns value each row, maybe make a 5th column as a concatenation of all 4.

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1339
  • Country: pl
Re: how to check umatched rows in excel
« Reply #3 on: May 29, 2022, 10:09:59 am »
This answer is relevant mostly if you want to see the differences and not programmatically process them. You may skip it if it’s not the case.

Are you actually collecting data inside Excel (with VBA?) or is that an XY problem? If the latter, next time please describe the actual situation — it will really aid helping you. I will assume you do not use Excel, as that would both be a weird choice of a tool, and it’s unlikely that one first writes entire data collection code and then fails to iterate over rows to find new entries. In case you do, you may export data as a CSV file.

What you ask about is creating a diff of two lists of rows. I believe they are ordered, as without that assumption the question can’t even be answered. If you have data in consistently formatted rows, for example a CSV file, there are many tools that can handle that. In *nix systems you have a diff and comm. In Windows you may use command fc or a GUI application like Meld or Notepad++.

« Last Edit: May 29, 2022, 10:11:53 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: how to check umatched rows in excel
« Reply #4 on: May 29, 2022, 07:12:31 pm »
No mention of how this data is collected and written to Excel, and it's important.  I would probably use Python.  Easy to check the previous data and then write it out to any file format needed.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: how to check umatched rows in excel
« Reply #5 on: May 29, 2022, 07:45:40 pm »
create a unique key by converting the 4 columns into single string
then use VLOOKUP() for each new entry's unique key to scan the previous data set to see if the key is present or not.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf