+ Reply to Thread
Results 1 to 13 of 13

VBA/Formula to identify similar values in multiple rows and assign a name

  1. #1
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    VBA/Formula to identify similar values in multiple rows and assign a name

    Hi,

    I have a worksheet with multiple rows. there are some rows with similar values, i.e if we filter, values in row'x' matches with row 'y'. similarly values in row 'a' matches with row 'b'. I would like to have any formula or vba that can identify the similar rows and then assign a name for each matching row. I have attached a snap for reference.
    Row comparison.PNG
    Thank you.

    Regards,

    Rajeshkumar

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Hi, welcome to the forum

    1. does each column have to match, or just certain columns?
    2. How do you define what name to use?
    3. I have a feeling you are looking for something like ....
    ="name "&countifs(A:A,A1,B:B,B1...............)
    4. If that doesnt help, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Hi,

    Thank you.

    I tried using the formula but didnt get the desired output.

    I have a issue in attaching the file. Unable to use the attach file option.

    Regards,

    Rajesh

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  5. #5
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Hi,

    Thank you for your help. I have attached a file with the actual requirement.

    Your support will be highly appreciated.

    Thank you.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Hi, i have attached the file, kindly help me on this.

    Regards,

    Rajesh

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    This proposed partial solution identifies matching rows. The solution employs two helper columns which may be placed in an inconspicuous location, columns XFC:XFD in the attached file, and/or hidden for aesthetic purposes.
    The formula that populates the first helper column is: =D16&E16&F16&G16
    The formula that populates the second helper column is: =MATCH(XFC16,XFC$16:XFC16,0)
    The formula that displays the 'Type' is: ="TYPE-"&XFD16
    If you could further explain the rational behind your naming system then perhaps someone here will be able to modify this solution to match the names shown in post #1.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Hi JeteMC, Thanks for your reply. It gave me a sort of solution i'm looking for. The naming system is done based on the identical rows. As "MATCH" does by taking the first matching rows and assigning the numbers according, we do the same by manually. The only thing in MATCH is that the sequence. If that is solved it should solve my issue.

    Thank you.

    Regards,

    Rajesh

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    At present I don't understand why the why S no 1 is assigned Type-3 and S no's 2 and 3 are assigned Type-1. To make an attempt at solving the issue of matching the sequence in post #1 I'd need to understand the rational behind the sequence. If you could explain the sequence, I (or one of the other volunteers) will try to write a solution.
    Let us know if you have any questions.

  10. #10
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Hi, sorry for giving minimum inputs.
    I have assigned the type numbers as described below.
    We have columns L1,L2, L3 & L4. First i disabled blanks in each column L1 to L4 , when i did this i was left with rows s.no 2, 4 & 7, so i gave them TYPE-1.
    Then i enabled blank in column L4 and disabled 300 LR, so i was left with rows s.no 9 & 10, hence i gave them TYPE-2 & so on.

    Hope this will give you some clue, kindly let me know if more details are required.

    Regards,

    Rajesh

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    If I understand this has more to do with blanks than the values in the cells that are not blank.
    The proposed solution uses several helper columns, which may be moved and/or hidden, populated by two formulas.
    The formula for the "None" helper column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The formula for the "L4" through "L1" columns is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-10-2017
    Location
    Chennai
    MS-Off Ver
    Office 16
    Posts
    26

    Thumbs up Re: VBA/Formula to identify similar values in multiple rows and assign a name

    Thanks JeteMc for your guidance.. This helped me a lot & forgive me for late reply.


    Cheers!!!

    Rajesh

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: VBA/Formula to identify similar values in multiple rows and assign a name

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. How to compare multiple columns, and identify the MOST similar
    By IAPharmGirl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2016, 04:24 PM
  2. Identify similar value of different tab
    By areku33 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2014, 12:06 AM
  3. Identify a group of rows where all values in one column are identical
    By shadowthorn69 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-13-2014, 04:18 AM
  4. Combine rows with similar values in one column.
    By sgtpepper in forum Excel General
    Replies: 1
    Last Post: 12-06-2011, 09:31 PM
  5. Combine rows with similar values in one column.
    By sgtpepper in forum Excel General
    Replies: 3
    Last Post: 12-06-2011, 01:43 PM
  6. Replies: 3
    Last Post: 10-02-2011, 05:06 PM
  7. Separator to identify similar rows and code to add it
    By biteinsteig in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2011, 07:52 AM

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