+ Reply to Thread
Results 1 to 6 of 6

Find and group/highlight almost identical or in series numbers in Excel

  1. #1
    Registered User
    Join Date
    06-30-2023
    Location
    India
    MS-Off Ver
    Office 2021 Professional
    Posts
    7

    Post Find and group/highlight almost identical or in series numbers in Excel

    Hi Masters,
    I need to find and group/highlight almost identical numbers or numbers which are in series..
    Please see this image or workbook attached

    excel.png

    I can user filter and then sort the numbers from smallest to largest but there are thousands of other numbers also, which will be in the ascending order according to sort but not in series.
    I missing the key here. And Manually I cannot find as I don't have idea what number would be in series and what digit it would start.

    Any help is appreciated.`

    Note - The attached excel is just a part of data on which I am working, there are thousands of random numbers.

    I am new to forums and please let me know if I have not followed any guideline while posting, I'll take care from next time.

    Regards
    Mini.
    Attached Files Attached Files
    Last edited by minialex; 06-30-2023 at 04:17 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Find and group/highlight almost identical or in series numbers in Excel

    You can use this conditional formatting rule, applied to the cells in A2:A412:

    =SUMPRODUCT(--(LEFT(A2,LEN(A2)-1)=LEFT($A$2:$A$412,LEN($A$2:$A$412)-1)))>1

    This will find the cells where only the last digit is different (governed by the 1 highlighted in red). You could use a second rule (with a different colour) and change the highlighted 1 to 2 to find the cells where the last 2 digits are different.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-30-2023
    Location
    India
    MS-Off Ver
    Office 2021 Professional
    Posts
    7

    Re: Find and group/highlight almost identical or in series numbers in Excel

    Quote Originally Posted by Pete_UK View Post
    You can use this conditional formatting rule, applied to the cells in A2:A412:

    =SUMPRODUCT(--(LEFT(A2,LEN(A2)-1)=LEFT($A$2:$A$412,LEN($A$2:$A$412)-1)))>1

    This will find the cells where only the last digit is different (governed by the 1 highlighted in red). You could use a second rule (with a different colour) and change the highlighted 1 to 2 to find the cells where the last 2 digits are different.

    Hope this helps.

    Pete
    Thank you, Pete.

    I am getting below message while applying rule in conditional formatting.
    Note - I am applying to range C2 - C29989 and have made changes to your given formula.

    Attachment 834851

    Regards.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Find and group/highlight almost identical or in series numbers in Excel

    is this is acceptable?

  5. #5
    Registered User
    Join Date
    06-30-2023
    Location
    India
    MS-Off Ver
    Office 2021 Professional
    Posts
    7

    Re: Find and group/highlight almost identical or in series numbers in Excel

    Quote Originally Posted by sandy666 View Post
    is this is acceptable?
    Thank you Sandy.

    I think you have used power queries and I am not that familiar with that. Not sure how to implement the same on my data.

    Let me do some home work figuring it out.

    Regards.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Find and group/highlight almost identical or in series numbers in Excel

    sure
    this is a Power Query, here is an explanation so maybe it will help a bit

    Let's break down each line:
    1. let:
      This is the start of a variable assignment. It allows you to define and name a query with a sequence of steps.
    2. Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content]:
      This line sets the variable "Source" to the content of the table named "Table1" in the current Excel workbook. The "Excel.CurrentWorkbook()" function retrieves the current workbook, and then the "{[Name="Table1"]}" part specifies to get the table named "Table1," and "[Content]" extracts its content.
    3. Text = Table.TransformColumnTypes(Source,{{"Numbers", type text}}):
      The "Table.TransformColumnTypes" function is used to transform the "Numbers" column of the "Source" table into the "Text" data type.
    4. #"Duplicated Column" = Table.DuplicateColumn(Text, "Numbers", "NumbersD"):
      This line creates a new table by duplicating the "Numbers" column from the "Text" table and names the new column as "NumbersD."
    5. #"Split Column by Positions" = Table.SplitColumn(#"Duplicated Column", "NumbersD", Splitter.SplitTextByPositions({8}), {"NumbersD.1"}):
      Here, the "Table.SplitColumn" function is used to split the "NumbersD" column in the "Duplicated Column" table based on positions. It takes the first 8 characters from the "NumbersD" column and creates a new column named "NumbersD.1."
    6. #"Grouped Rows" = Table.Group(#"Split Column by Positions", {"NumbersD.1"}, {{"All", each _, type table [Numbers=nullable text, NumbersD.1=nullable text]}, {"Count", each Table.RowCount(_), Int64.Type}}):
      This line groups the rows of the "Split Column by Positions" table based on the values in the "NumbersD.1" column. The "Table.Group" function groups the rows and creates two new columns: "All," which contains the original rows in each group, and "Count," which counts the number of rows in each group.
    7. #"Added Custom" = Table.AddColumn(#"Grouped Rows", "List", each [All][Numbers]):
      This line adds a custom column named "List" to the "Grouped Rows" table. The "List" column contains the "Numbers" column from the "All" column, which represents the original rows in each group.
    8. #"Extracted Values" = Table.TransformColumns(#"Added Custom", {"List", each Text.Combine(List.Transform(_, Text.From), ","), type text}):
      This line transforms the "List" column in the "Added Custom" table. It combines the values in each row of the "List" column into a single text value, separated by commas.
    9. #"Sorted Rows" = Table.Sort(#"Extracted Values",{{"NumbersD.1", Order.Ascending}}):
      The last step is to sort the "Extracted Values" table based on the "NumbersD.1" column in ascending order.
    10. in #"Sorted Rows":
      Finally, the result of all these transformations is the "Sorted Rows" table, which is the output of the entire query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Highlight if greater than all previous numbers in a series
    By flizzo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2021, 01:04 PM
  2. Highlight numbers in a column +/- 2.5 from a select group of numbers
    By AlgoTrader77 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-22-2018, 02:30 AM
  3. How to merge series with identical names on line graph? Excel 2007.
    By pizdets in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-16-2014, 06:51 AM
  4. Find Identical 4 numbers Straight Or Permuted In a Range
    By vanaj in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 11-28-2011, 12:36 PM
  5. Find Identical 4 numbers Straight Or Permuted In a Data Range
    By vanaj in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-25-2011, 10:57 AM
  6. Find and Highlight a group of numbers
    By Krazy Kasper in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2008, 04:17 PM
  7. Replies: 1
    Last Post: 01-09-2006, 09:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1