+ Reply to Thread
Results 1 to 21 of 21

Format a number when that nunber duplicates

  1. #1
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Format a number when that nunber duplicates

    Hi, My name is Rui, i'm from portugal, sorry for my bad english, i hope i can be hunderstood.

    I need an excel file to do this:

    i have one colune like this:

    492
    500
    773
    738
    572
    492 when i repetat this number i need that the first (492) be formatted with a color and continus like this
    200
    572 fotmat the first 572
    492 formatt the next 492 but the actual number stays withou formatting!


    Regards!

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Format a number when that nunber duplicates

    Assuming your numbers are in Cells A1:A9 then :
    =AND(COUNTIF(A1:A$9,A1)>1,COUNTIF(A$1:A1,A1)=1)

    applied as a conditional format will only highlight the first of each duplicate

    A1 is the top cell in the range.. A9 the bottom... The above function is applied to cell A1 and then extended down the column.
    Last edited by AndyLitch; 06-22-2013 at 11:01 AM.
    Elegant Simplicity............. Not Always

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

    Re: Format a number when that nunber duplicates

    This uses Conditional Formatting.
    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

  4. #4
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by newdoverman View Post
    This uses Conditional Formatting.
    Thanks for the awnser, but i need to when i write a duplicated number the excel format the duplicated numbers on top, but not the number that i wrote in that moment, that number that i wrote only be formatted whne i repeated again below!

  5. #5
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by AndyLitch View Post
    Assuming your numbers are in Cells A1:A9 then :
    =AND(COUNTIF(A1:A$9,A1)>1,COUNTIF(A$1:A1,A1)=1)

    applied as a conditional format will only highlight the first of each duplicate

    A1 is the top cell in the range.. A9 the bottom... The above function is applied to cell A1 and then extended down the column.
    Hi thanks, if you can put a file with this formula i apreciate because my excel is in portuguese the formulas was a little different!

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Format a number when that nunber duplicates

    @xinex21

    You want to get an solution.

    Why should forummembers need to make a file for you?

    Some forummember don't want to make a file.

    You get better help if YOU add an excel file, without confidentional information, so a forummember can put the formula in the file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  7. #7
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by oeldere View Post
    @xinex21

    You want to get an solution.

    Why should forummembers need to make a file for you?

    Some forummember don't want to make a file.

    You get better help if YOU add an excel file, without confidentional information, so a forummember can put the formula in the file.
    repetição.xlsx

    Sorry, but the file is very simple.

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Format a number when that nunber duplicates

    See the attache file.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by oeldere View Post
    See the attache file.
    Is not what i want, i will try to be more specific, this file is to control employers, so each number means an enployer so imagine that 500 is my employer and in day one he work in a shift donīt matter what shift, in the next day 500 will do another shift, but some days after he can make again the same shift and to have no errors i need 500 do this shif and in excel is number stays without formating, but when he repeate this shift the last time that he do this shift format with a color, this is good to me to scale another employer to another shift, so this formula is for a month and the same empleyor do the same shift severel times but i want all the times be formated only the last time not!

    Wait you hunderstand my bad english!

    Regards!

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

    Re: Format a number when that nunber duplicates

    Perhaps this is what you are looking for.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Duplicates (3).xlsx
    Quote Originally Posted by newdoverman View Post
    Perhaps this is what you are looking for.
    Hi this is what i need!

    here it is the file but hand made for me, i need it with formulas or conditional formated!

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

    Re: Format a number when that nunber duplicates

    Inspiration isn't striking at the moment

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Format a number when that nunber duplicates

    @xinex21

    And how did you determine the colors in your sheet (if there is no data) to compare with.

    Why is value 492 blue in case 1, 2 and 3 and white in case 4?

    I don't see the logic in your file.

  14. #14
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by oeldere View Post
    @xinex21

    And how did you determine the colors in your sheet (if there is no data) to compare with.

    Why is value 492 blue in case 1, 2 and 3 and white in case 4?

    I don't see the logic in your file.
    Hello, in my file i formated the numbers mannualy, the logic of that its, when i want to put a employer to work i know that employer can do the shift because this employer (492) is free to do it

  15. #15
    Registered User
    Join Date
    06-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Format a number when that nunber duplicates

    xinex21,

    There is a conditional formatting option for duplicates. I applied this to a range (A1:A1000). Whenever a duplicate number is added then both duplicates are highlighted, if you delete one of the duplicates then the conditional formatting disappears.

    Check out the attached file. I have included a screenshot so you can see which conditional formatting option you need to select.

    Does this help?

    Regards

    David
    Attached Files Attached Files
    Last edited by JBeaucaire; 08-14-2013 at 10:59 AM.

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

    Re: Format a number when that nunber duplicates

    I managed to colour the cells that you have no colour in. Perhaps that will work for you.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by newdoverman View Post
    I managed to colour the cells that you have no colour in. Perhaps that will work for you.
    Hi, thanks, its almost there can you invert the procedure?
    if i put 500 on the file, this number higlights, and the other 500's on top are non formatted, what i need is reverse!

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

    Re: Format a number when that nunber duplicates

    I'm getting tired. How's this?
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Quote Originally Posted by newdoverman View Post
    I'm getting tired. How's this?
    Thanks a lot!!! is that i need many thanks, i was almost thinkin thts was impossible!

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

    Re: Format a number when that nunber duplicates

    You are welcome. I too was almost thinking that it was impossible. The formula in column B can be deleted if you like as it is only there to show how the Conditional Formula was developed.

  21. #21
    Registered User
    Join Date
    06-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    23

    Re: Format a number when that nunber duplicates

    Livro Escala.xlsx
    Quote Originally Posted by newdoverman View Post
    You are welcome. I too was almost thinking that it was impossible. The formula in column B can be deleted if you like as it is only there to show how the Conditional Formula was developed.
    Hi again, i have workin on my workshhet and now its like that!

    Many thanks once again!
    The colmn B are in worksheet hidden, i have seen conditional formula in column A!!! Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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