+ Reply to Thread
Results 1 to 15 of 15

Counting Numbers

  1. #1
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Counting Numbers

    Hi to everyone,

    I've got a problem now:

    I have to search for multiple numbers that are used more than ten times. But I would like to do conditional formatting with new colours on each number that are duplicated.

    So for number (1) I want green and for number (2) I want orange.

    I have used the following formula to count the number and that is working fantastic: =COUNTIF(D:D,D2)>10

    Now I just need to get the colours right.

    Thanking you in advance

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    The conditional format formula for GREEN
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The conditional format formula for ORANGE
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    see attached workbook for working example
    Attached Files Attached Files
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    Thank you so much Kev_

    The numbers I need to search and format are cell phone numbers.

    Do I just put the cell phone numbers in?

    How do i add a file for the example?

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    to attach a file
    - click REPLY ... GO ADVANCED ... look below for MANAGE ATTACHMENTS etc

  5. #5
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    Thank you.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    So this is the sheet.

    I need to know which number are used more than ten times, then I would like to have all the different numbers different colour as per conditional formatting.

    Just make the columns bigger to show the whole number

    Thank you in advance

  7. #7
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    Are the cellphone numbers known to you or could they be any number?

  8. #8
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    They are different on different sheets. So say for instance I have 5 bills to do, for every bill there are different numbers on there.

    And they sometimes so 27 in front other times just 0.

    I would like to get that all the same
    Last edited by Landi; 03-02-2017 at 05:39 AM.

  9. #9
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    So you are analysing calls made from various cellphones and you want to be able to see
    - which numbers were called more than 10 times and
    - see the analysis of each one
    Is that correct?

    To use conditional formatting in the way you want, Excel requires an instruction to colour code cells.
    To do that:
    either
    - Excel creates a list of phone numbers and allocates colours to each one
    or
    - the user provides a list of numbers and a colour for each one.

    Do you have a list of valid numbers?
    Or does Excel have to create it dynamically?
    (the 2nd option probably requires VBA)

    How many numbers called >10 times do you expect per bill?
    (if there are too many, then column D will become a meaningless jumble of colours)

    I may have a different solution - depends on your answers

  10. #10
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    So you are analysing calls made from various cellphones and you want to be able to see
    - which numbers were called more than 10 times and
    - see the analysis of each one
    Is that correct?

    Yes that is correct

    Do you have a list of valid numbers? No I don't have a list but I might be able to create a list but it will take more time to do that.
    Or does Excel have to create it dynamically? I don't think it is necessary, because I have no idea ho VBA works
    (the 2nd option probably requires VBA)

    How many numbers called >10 times do you expect per bill? I have no idea, I am just starting the exercise.

    I hope that answers your questions?

  11. #11
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    It looks as though you want to avoid using VBA - which is fine.

    If you want a different colour used for each number then you have to provide Excel with a specific instruction.
    - Excel could use a table with phone numbers in one column and a colour code in the next column
    - conditional formatting can then look up each number and use the colour it's been told to use in the table
    (which is a bit of a burden on the user as it requires ongoing maintenance when numbers change)

    To avoid that burden I will spend a bit of time exploring ways of getting Excel to automatically choose colours for you.

    More later...............

  12. #12
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    Thank you Kev_

    It's not that I want to avoid it, I just don't know it.

    I would love to learn more of functions and formulas so that I can do this on my own (and even VBA) (My husband is a developer, so understand the very, very basics of programming). But I don't know where to start.

    In the meantime I have to check the physical bills and highlight the numbers myself.

    That's why I want to use excel to make it easier and more efficient.

    Thank you for the help Kev_
    Last edited by Landi; 03-02-2017 at 07:13 AM.

  13. #13
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    I have looked at various options using Excel's standard conditional formatting and whilst there are lots of things you can do, it can get pretty complicated quickly. Trying to do exactly what you wanted involved a rather long formula or setting up a table, which seems a bit of an overkill given what you are trying to achieve.
    So here is a workable compromise in the attached worksheet

    All formatting is based on columnD
    The formula is always the same (with the final value changed)
    =COUNTIF(D:D,D1048576)>10


    1. Values in your database replicated a few times to give me enough numbers to play with
    2. FIVE identical conditional formatting rules set up each with a different value and colour
    - you can have as many as you like
    3. By setting them up in the correct order (starting with the smallest value) there is no need for "Less than"
    - the topmost rule in the list takes precedence)

    Obviously you will need to set up your own values to suit the real data
    - more than one number may rest within the same range in which case they share a colour
    - more ranges = fewer numbers in the same range

    Let me know what you think - there are many ways to cook this cake!!

    CondF03.jpg
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-03-2017
    Location
    South Africa
    MS-Off Ver
    2013
    Posts
    34

    Re: Counting Numbers

    Thanx Kev_

    I will have a look at it and try it myself.

    Then I will let you know how it works for me... But it looks simple enough to do.

    Will it work if the cellphone number changes even if two different cell phone numbers have the same quantity?

    I also wanted to ask: The number in the formula always changes when you click apply then it doesn't work. Why does that happen?

    Mine changes from the number I entered to something XBE and then some numbers.

    I see yours changed as well yet it did work?

  15. #15
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Counting Numbers

    A trick for you - see below
    Avoid that problem with {F2} and going into edit mode

    The images are all bottom left of display

    ReadyMode.jpg

    EnterMode.jpg

    EditMode.jpg

+ 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. Replies: 3
    Last Post: 10-30-2014, 03:57 PM
  2. count alphanumeric codes only counting odd numbers not even numbers?
    By JACKBKNIMBLE in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2013, 02:43 PM
  3. Re: Counting Numbers
    By newbie4 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-17-2012, 02:44 PM
  4. Replies: 5
    Last Post: 09-25-2010, 12:43 PM
  5. Counting the numbers
    By mangesh in forum Excel General
    Replies: 7
    Last Post: 07-27-2010, 02:59 AM
  6. counting between numbers
    By curly88 in forum Excel General
    Replies: 1
    Last Post: 09-29-2006, 01:40 AM
  7. counting numbers
    By cj21 in forum Excel General
    Replies: 6
    Last Post: 02-16-2006, 07:35 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