+ Reply to Thread
Results 1 to 10 of 10

formula repeated numbers

Hybrid View

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    formula repeated numbers

    Hello everyone.
    I have to include this formula in C2:C34000

    =SE(E(A2<>"";CONTA.SE($A$2:A2;A2)-1);"ripetuto";"") (italian)

    =IF(AND(A2<>"",COUNTIF($A$2:A2,A2)-1),"ripetuto","") (english)

    It serves to highlight repeated numbers.
    I tried to put it in the range but hangs around.
    Is there a way to insert it faster?
    Thanks in advance.
    max_max

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: formula repeated numbers

    COUNTIF can be a memory hog when you create 10s of thousands against the same data set ad nauseum. If all you need is to spot if a value has occurred already, MATCH is distinctively quicker.

    =IF(AND(A2<>"", ISNUMBER(MATCH(A2, $A$1:$A1, 0))), "ripetuto", "")

    ...copied down ad nauseum.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: formula repeated numbers

    Hello Jbeaucarie.
    It seems faster.
    In italian the formula is:

    =SE(E(A2<>""; VAL.NUMERO(CONFRONTA(A2; $A$1:$A1; 0))); "ripetuto"; "")

    Thank you.
    max_max

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: formula repeated numbers

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: formula repeated numbers

    Hello the formula works well.

    =IF(AND(A2<>"", ISNUMBER(MATCH(A2, $A$1:$A1, 0))), "ripetuto", "")

    only two small change.

    In the cells there are data with asterisk
    G-CSF 3:55*
    H-CSF3.77*
    H-GS71.29*
    H-MR135.11*
    H-MR135.99*
    H-MR135.21/S*
    H-MR135.278*
    The formula recognizes this data as repeated and not exact, perhaps by entering text in the formula?

    You can add as well as "repetuto" even "non ripetuto" for cells not duplicated?

    Thank you in advance.
    max_max

  6. #6
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: formula repeated numbers

    What is that data matching to?

    e.g. is H-CSF3.77* matching with H-CSF3.7757888 therefore using the * as a wildcard?
    Do you actually need to look for matches with those lines or can you ignore checking lines with an asterix?

    If you can ignore checking lines with * for repeats then:-
    =IF(OR(A2="",RIGHT(A2,1)="*"),"",IF(ISNUMBER(MATCH(A2, $A$1:$A1, 0)), "ripetuto", "non ripetuto"))
    Last edited by Beamernsw; 01-04-2016 at 08:10 AM.

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: formula repeated numbers

    In the column A there are these data.

    G-CSF 3:55
    G-CSF 3:55*
    ----------------------
    H-CSF3.77
    H-CSF3.77*
    ----------------------
    H-GS71.29
    H-GS71.29*
    ----------------------
    H-MR135.11
    H-MR135.11*
    --------------------
    H-MR135.99
    H-MR135.99*
    ---------------------
    H-MR135.21/S
    H-MR135.21/S*
    ---------------------
    H-MR135.278
    H-MR135.278*

    with asterisk and without asterisk
    The formula recognizes this data as a duplicate, is not accurate.
    I hope I explained.
    max_max

  8. #8
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: formula repeated numbers

    OK, well if you don't need to check for repeats with * then the formula above should work, but if you do need to look for repeats including * then this should do it hopefully:-
    =IF(A2="","",IF(ISNUMBER(MATCH(IF(RIGHT(A2,1)="*",A2&"~*",A2), $A$1:$A1, 0)), "ripetuto", "non ripetuto"))

  9. #9
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: formula repeated numbers

    Hi
    Try these array formula (CSE --> CTRL+SHIFT+ENTER)
    =IF( ISNUMBER(MATCH(SUBSTITUTE(TEXT(A2,"@"),"*","|"), SUBSTITUTE($A$1:$A1,"*","|"), 0)),"ripetuto", "")
    Formula: copy to clipboard
    =IF( ISNUMBER(MATCH(SUBSTITUTE(TEXT(A2,"@"),"*","|"), SUBSTITUTE($A$1:$A1,"*","|"), 0)),"ripetuto", "")

    You can subtitute "|" with other char not used, for example CHAR(7)

    Regards

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: formula repeated numbers

    Hello to all.
    Thank you BeamerNsw, the second formula works.
    Thanks to Jose Augusto but "SUBSTITUTE" with "|" it does not work.
    Thank you all.
    max_max

+ 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. Highlight repeated numbers
    By Alicia0096 in forum Excel General
    Replies: 2
    Last Post: 08-03-2010, 09:57 PM
  2. Replies: 5
    Last Post: 08-06-2009, 05:17 PM
  3. How to copy repeated numbers
    By cruzesr in forum Excel General
    Replies: 1
    Last Post: 05-22-2008, 09:01 PM
  4. [SOLVED] finding repeated numbers
    By aswini77@yahoo.com in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-23-2006, 07:10 AM
  5. [SOLVED] how to extract unique numbers once from a list of repeated numbers?
    By stuart.kwok@gmail.com in forum Excel General
    Replies: 2
    Last Post: 05-02-2006, 11:20 AM
  6. delete repeated numbers
    By Labman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-10-2005, 08:07 PM
  7. [SOLVED] HOW DO I GET A WARNING FOR REPEATED NUMBERS
    By Kenya in forum Excel General
    Replies: 4
    Last Post: 04-05-2005, 03:06 AM
  8. [SOLVED] how do i get a warning for repeated numbers
    By Kenya in forum Excel General
    Replies: 1
    Last Post: 04-04-2005, 09:06 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