+ Reply to Thread
Results 1 to 8 of 8

Doubt on how to highlight rows that have same account number but different names

  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    new panvel
    MS-Off Ver
    Excel 2003
    Posts
    4

    Doubt on how to highlight rows that have same account number but different names

    Hi I wanted to know excel formula and function that highlight rows that have same account number but different names. I don't want to highlight rows that have same account number and same customer name. I want to highlight rows that have got same account number but different names.

    For eg those highlighted in red in attached file.

    Doubt.JPG
    Last edited by kumshan450; 04-06-2015 at 10:43 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Doubt on how to highlight rows that have same account number but different names

    use conditional formatting.

    use countif to find duplicate account numbers and highlight the entire row.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    01-02-2012
    Location
    new panvel
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Doubt on how to highlight rows that have same account number but different names

    Hi thanks appreciate your quick reply. but using conditional formatting/countif would not give me the desired result as I wanted to highlight rows that have same account number but different names. Using conditional formatting/countif would also highlight that have same account number and same names. Also you were right that I have not provided enough data to demonstrate my need. please find the attached file
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Doubt on how to highlight rows that have same account number but different names

    This macro does what you need.

    Select the developer tab

    Then click on run Macro and select Highlight


    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Doubt on how to highlight rows that have same account number but different names

    I get that you want to highlight the row if there is more than one count per account regardless of the name associated with it. This is one way of doing this using a helper column with the following formula in column C.

    This formula will result in a TRUE or FALSE for each row. All rows with TRUE will be highlighted with red.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    01-02-2012
    Location
    new panvel
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Doubt on how to highlight rows that have same account number but different names

    Hi thanks but is there any simple formula?

  7. #7
    Registered User
    Join Date
    01-02-2012
    Location
    new panvel
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Doubt on how to highlight rows that have same account number but different names

    Hi thanks for the quick reply Actually my concern is highlight the row if there is more than one count per account and two different customer names. I got a clue from the formula mentioned that you have but not getting exact answer

    I did =COUNTIF($A$2:$A$15,A2)>1 for the name column
    I did =COUNTIF($B$2:$B$15,B2)>1 for the account column
    I applied auto filter on the data and selected countifcount for the name column as false and then selected countifcount for the name column as True.
    I got somewhat the result I want but missed account number which has got both different customer name and same customer name in the data. Refer Account no 124

    Once again thanks
    Attached Files Attached Files

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Doubt on how to highlight rows that have same account number but different names

    select A2:B15 and use the below formula in conditional format
    =SUM(INDEX(1/COUNTIFS($B$2:$B$15,$B$2:$B$15,$A$2:$A$15,$A$2:$A$15)*($B$2:$B$15=$B2),0))>1
    see attached file
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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. VBA Code Help needed to move Account Number rows to different shet
    By hollywoodbob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2014, 12:31 PM
  2. Return Account Nickname if Account Number Matches
    By spacle in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-03-2013, 11:04 AM
  3. [SOLVED] How to censor account numbers based on how many characters are in the account number
    By Mcorydon in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-25-2013, 01:06 PM
  4. Auto sum data in rows by account number
    By curt03yzfr1 in forum Excel General
    Replies: 3
    Last Post: 12-09-2011, 09:05 AM
  5. Summing Rows based on Account Number
    By chalaki in forum Excel General
    Replies: 1
    Last Post: 06-21-2011, 02:12 PM

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