+ Reply to Thread
Results 1 to 12 of 12

Conditional Formatting - 2 columns of "general" numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    10-15-2008
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    31

    Conditional Formatting - 2 columns of "general" numbers

    See attached. I have 2 columns with SIM card numbers in them.

    Due to the length of the numbers, I have inserted an apostrophe (') at the beginning of each number in my template (Column A is copied/pasted directly from my template into this spreadsheet), otherwise it changes the number to 8.898817E+18. As well, if I convert this column to a "number", (for example, A2 is 8988169214000455545), then it changes 8.898817E+18, which does change the correct number to something that does not match the original.

    Note that Column D has been brought into the spreadsheet using the text wizard: Data>From Text>Space Delimited. When done this way, the numbers come into my spreadsheet WITHOUT an apostrophe (') at the beginning of the SIM card number.

    I am using Conditional Formatting > Highlight Cell Rules > Duplicate Values. There ARE differences in each column, but the Conditional Formatting is not highlighting correctly. Instead ALL cells in both columns are highlighting.

    What am I overlooking? Is it the fact that the numbers are not formatted the same? How can I get my template numbers (Column A) not to convert to 8.898817E+18 when inputted without the apostrophe (') at the beginning of the SIM card number?

    I appreciate any and all help to resolve this issue.

    Thank you,
    -prefcomm
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,823

    Re: Conditional Formatting - 2 columns of "general" numbers

    the Conditional Formatting is not highlighting correctly. Instead ALL cells in both columns are highlighting.
    The conditional formatting is highlighting correctly. All cells in both columns have duplicates.

    Your duplicate rule looks at a cell, then checks to see if it is duplicated anywhere in the data in columns A and D. For example, look at row 183. The value in column A (8988169224001445858) does not appear in column D, but it appears 22 times in column A. That is considered a duplicate.

    Are you trying to find cases only where data in one column appears in the other column?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-15-2008
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    31

    Re: Conditional Formatting - 2 columns of "general" numbers

    Quote Originally Posted by 6StringJazzer View Post
    For example, look at row 183. The value in column A (8988169224001445858) does not appear in column D, but it appears 22 times in column A. That is considered a duplicate.

    Are you trying to find cases only where data in one column appears in the other column?
    I have done CTRL-F and looked for 8988169224001445858 and can only locate it on the spreadsheet ONCE on the entire page. I am not seeing where it is in column A 22 times. And if it is only one the sheet once, then it should NOT be highlighted because there is no duplicate of it anywhere else on the sheet. Correct?

    Yes, I am trying to find cases where data in one column also appears in the other column. But I also want to see if there is data in one column (either one) that is not in the other column.

    It would seem that since one column has 754 lines and the other has 745 lines that there should be some that are not in both columns. For a fact, each column itself should have no duplicates. Basically this is a checkoff to ensure we are billed for all active SIM cards. Column A is what we have on record as active, while column D is what our provider billed us for. There are typically discrepancies because column A is up-to-date while column D is what was active last month.

    Make sense?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,823

    Re: Conditional Formatting - 2 columns of "general" numbers

    Quote Originally Posted by prefcomm View Post
    I have done CTRL-F and looked for 8988169224001445858 and can only locate it on the spreadsheet ONCE on the entire page.
    OK, maybe this is more insidious. I did a COUNTIF and got 22 on that one, but I did not look for where the other occurrences are. I'll come back after further examination.

  5. #5
    Registered User
    Join Date
    10-15-2008
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    31

    Re: Conditional Formatting - 2 columns of "general" numbers

    Quote Originally Posted by 6StringJazzer View Post
    OK, maybe this is more insidious. I did a COUNTIF and got 22 on that one, but I did not look for where the other occurrences are. I'll come back after further examination.
    Thanks 6StringJazzer!!!

    Edited to add - I did the COUNTIF and it did indeed find it 22 times, however, it is because it changed the number to 8988169224001440000 even though I entered it as 8988169224000445858. Hmmm...this is the same problem that I have when I do not put an apostrophe (') in front fo the number in any given cell.
    Last edited by prefcomm; 05-17-2018 at 03:33 PM.

  6. #6
    Registered User
    Join Date
    10-15-2008
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    31

    Re: Conditional Formatting - 2 columns of "general" numbers

    6StringJazzer, did you have any luck figuring this one out?

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,823

    Re: Conditional Formatting - 2 columns of "general" numbers

    Just finding behavior that I can't figure out. COUNTIF is matching things that don't actually match. I have never seen this before and still trying to narrow it down.

  8. #8
    Registered User
    Join Date
    10-15-2008
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    31

    Re: Conditional Formatting - 2 columns of "general" numbers

    Quote Originally Posted by 6StringJazzer View Post
    Just finding behavior that I can't figure out. COUNTIF is matching things that don't actually match. I have never seen this before and still trying to narrow it down.
    Thanks 6StringJazzer!! I value your input and look forward to your feedback soon!

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,823

    Re: Conditional Formatting - 2 columns of "general" numbers

    I have isolated the problem and have posted another thread to see if we can get a solution to that specific problem.

    https://www.excelforum.com/excel-for...ml#post4901347

  10. #10
    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
    53,048

    Re: Conditional Formatting - 2 columns of "general" numbers

    I added a helper column and just kept the right-most 15 characters, and the countif worked, not sure if this is something the OP would consider....
    G
    H
    I
    2
    169214000798449
    3
    169214000798381
    1
    4
    169214000798384
    1
    5
    169214000798344
    1
    6
    169214000798444
    1
    7
    169214000794444
    1
    8
    169214000744444
    1
    9
    169214000744444
    2

    G2=TRIM(RIGHT(A2,15))
    I3=COUNTIF(G$2:G3,G3)
    both copied down

    The 1st 4 digits seems constant
    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

  11. #11
    Registered User
    Join Date
    10-15-2008
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    31

    Re: Conditional Formatting - 2 columns of "general" numbers

    Quote Originally Posted by FDibbins View Post
    I added a helper column and just kept the right-most 15 characters, and the countif worked, not sure if this is something the OP would consider....
    G
    H
    I
    2
    169214000798449
    3
    169214000798381
    1
    4
    169214000798384
    1
    5
    169214000798344
    1
    6
    169214000798444
    1
    7
    169214000794444
    1
    8
    169214000744444
    1
    9
    169214000744444
    2

    G2=TRIM(RIGHT(A2,15))
    I3=COUNTIF(G$2:G3,G3)
    both copied down

    The 1st 4 digits seems constant
    FDibbons, this does resolve the issue in a roundabout way, however, this requires much more manual work to then go back to the original lists and locate those that did not highlight due to the conditional formatting. But this does do the trick.

    6StringJazzer, I look forward to any answers you get to the new thread started.

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Conditional Formatting - 2 columns of "general" numbers

    This Formula is working. Formula for A2 then extend for other cells.
    =SUMPRODUCT((LEFT($A$2:$A$754,10)=LEFT(A2,10))*(RIGHT($A$2:$A$754,9)=RIGHT(A2,9)))+SUMPRODUCT((LEFT($D$2:$D$745,9)=LEFT(A2,9))*(RIGHT($D$2:$D$745,9)=RIGHT(A2,9)))>1
    I have tested for A2 only. A2 has duplicate in D2. If D2 value is deleted A2 will not have colour.
    Pl see file.In the file I applied CF for Column A Only.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 05-21-2018 at 11:20 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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] Conditional Formatting - copy "new" only new cell colors to other columns
    By zookeepertx in forum Excel General
    Replies: 4
    Last Post: 05-11-2016, 04:44 PM
  2. Replies: 5
    Last Post: 07-16-2015, 10:14 AM
  3. [SOLVED] Problems with formatting data ("General" to "Dates")
    By neori in forum Excel General
    Replies: 3
    Last Post: 03-13-2015, 10:34 AM
  4. Replies: 9
    Last Post: 05-20-2014, 09:35 PM
  5. [SOLVED] Convert from "general" (YYYYMMDD) to specific "custom" format (YYYY.MM.DD)
    By Ella_p in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-10-2013, 02:23 AM
  6. Replies: 2
    Last Post: 11-01-2012, 04:35 PM
  7. Replies: 2
    Last Post: 08-17-2012, 05:10 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