I'd focus on this option

Originally Posted by
paradise2sr
or any other.
A good tool for it could be Power Query.
At first I prepared a longer version (will give it below just for reference), but then the shorter:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"rawdata", type nullable text}}),
#"Added Custom" = Table.AddFuzzyClusterColumn(#"Changed Type", "rawdata", "fuzzygrouped", [IgnoreCase = true, IgnoreSpace = true, Threshold=0.5]),
#"Left only the same" = Table.ReplaceValue(#"Added Custom" ,each [rawdata],each if [rawdata] = [fuzzygrouped] then [rawdata] else null,Replacer.ReplaceValue,{"rawdata"}),
#"Removed Columns" = Table.RemoveColumns(#"Left only the same",{"fuzzygrouped"}),
#"Removed Blank Rows" = Table.SelectRows(#"Removed Columns", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))
in
#"Removed Blank Rows"
Changed type step is important, as fuzzy logic will not work with non-text data.
You can experiment with Threshold value. If this parameter is ommitted, (or equal default 0.8) then two last entries are not recognized as one, so I used lower one: 0.5 and for sample data is a good one.
Both queries are used in attached file. And as said before, second (the one I started with) query for reference:
let
TableSource = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Changed_Type = Table.TransformColumnTypes(TableSource,{{"rawdata", type text}}),
Source = Table.FuzzyNestedJoin(Changed_Type, {"rawdata"}, Changed_Type, {"rawdata"}, "Changed_Type", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, Threshold=0.5]),
//Function to transform table into only first (as sorted) row
Leave_only_first = (ATable as table) as table =>
let
#"Sorted Rows" = Table.Sort(ATable,{{"rawdata", Order.Ascending}}),
#"Kept First Rows" = Table.FirstN(#"Sorted Rows",1)
in
#"Kept First Rows",
//Applying function
The_Result = Table.TransformColumns(Source,{"Changed_Type", each Leave_only_first(_)}),
#"Expanded Table1" = Table.ExpandTableColumn(The_Result, "Changed_Type", {"rawdata"}, {"Table1.rawdata"}),
#"Added Conditional Column" = Table.AddColumn(#"Expanded Table1", "Custom", each if [rawdata] = [Table1.rawdata] then true else null),
#"Filtered Rows" = Table.SelectRows(#"Added Conditional Column", each ([Custom] = true)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Table1.rawdata", "Custom"})
in
#"Removed Columns"
Bookmarks