+ Reply to Thread
Results 1 to 15 of 15

I need to calculate how many times a number appears on the sheet

  1. #1
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    I need to calculate how many times a number appears on the sheet

    I need some help with a formula to calculate (automatically) how many times a number appears on a sheet I have 1-20 and want to know if there is a formula that can calculate how many times each one appeared in the sheet I have included the sheet I am working from If you need more info please ask as I am desperate

    Thank you
    Johann

    6 4 2
    2 1 15
    1 4 5 How many times
    5 1 2 1 ?
    1 11 2 2 ?
    7 2 3 3 ?
    2 1 5 4 ?
    9 3 16 5 ?
    6 ?
    6 9 11 7 ?
    4 11 12 8 ?
    7 6 8 9 ?
    7 5 2 10 ?
    10 8 15 11 ?
    4 3 1 12 ?
    13 ?
    12 5 2 14 ?
    1 2 4 15 ?
    3 6 2 16 ?
    17 ?
    1 9 10 18 ?
    5 7 1 19 ?
    10 3 2 20 ?
    11 1 9

    1 2 8
    1 2 10
    1 2 10
    8 3 4
    3 7 1
    2 3 6

    9 3 5
    2 1 12
    2 13 9
    7 1 2
    7 10 1
    7 1 6

    1 9 12
    2 10 1



    8 4 7
    2 7 6
    5 14 8

    11 5 3

    1 3 8

    16 6 10
    6 3 1

    6 8 3
    1 2 18

    2 18 11
    7 4 6
    8 1 7
    10 5 2
    15 2 4
    19 14 20
    4 1 10
    7 4 6
    4 1 13

    9 12 1
    5 9 7
    3 10 1
    1 3 7
    6 1 3
    8 1 9
    7 1 3
    7 5 3

    >�p<� @� td class=xl69 style='border-top:none;border-left:none'>

  2. #2
    Forum Contributor
    Join Date
    02-27-2004
    Location
    California, United States
    MS-Off Ver
    Excel 2016
    Posts
    315

    Re: I need to calculate how many times a number appears on the sheet

    use countif or countifs.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need to calculate how many times a number appears on the sheet

    Hi, and welcome to the forum.

    I don't see any attached sheet. However if that list is in A1:D76, with 1:20 in H1:H20 in I1 (and as CWatsonJr says) copied down

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    Re: I need to calculate how many times a number appears on the sheet

    Thank you for the reply I must however confess that I am a newby in excel and do not know how to use it here :-(

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need to calculate how many times a number appears on the sheet

    Copy the table of data you mentioned into A1:D76,
    Put the numbers 1-20 in H1:H20
    Put the formula I gave you in I1 and copy it down.

    See attached. Otherwise upload your actual workbook
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    Re: I need to calculate how many times a number appears on the sheet

    Hi Richard thank you Yes they are within the rages you mentioned but when I run the formula you gave it returns 0 where do I tell the formula to look for the number?

  7. #7
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    Re: I need to calculate how many times a number appears on the sheet

    Quote Originally Posted by Richard Buttrey View Post
    Copy the table of data you mentioned into A1:D76,
    Put the numbers 1-20 in H1:H20
    Put the formula I gave you in I1 and copy it down.

    See attached. Otherwise upload your actual workbook
    THank you Richard your attached file worked like a dream I than you again and have a great 2015

  8. #8
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    Re: I need to calculate how many times a number appears on the sheet

    Quote Originally Posted by Richard Buttrey View Post
    Copy the table of data you mentioned into A1:D76,
    Put the numbers 1-20 in H1:H20
    Put the formula I gave you in I1 and copy it down.

    See attached. Otherwise upload your actual workbook
    Hi Richard Me again I have another question on this same sheet. I now have the following numbers 1,2 3, 7, 11 Is there a formula for me to see when any of these numbers appear in a line and tell me how many of the numbers is in a specific line , it does not have to tell me which number appeared but how many of them appeared. It has to give me a result line by line? Thanking you in advance JOhann

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need to calculate how many times a number appears on the sheet

    Hi,

    The simplest way would be on row 1 copied down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    Re: I need to calculate how many times a number appears on the sheet

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    The simplest way would be on row 1 copied down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Again thank you..

    one more silly question to pick your brain with say I have some cells filled with a color...say yellow. is there a way to count the yellow cells? I know I am pushing my luck here :-)

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need to calculate how many times a number appears on the sheet

    Hi,

    It depends on how the cells have been coloured. If they are coloured by a conditional format then you could use the rule that applies the cond. format and express that as a count. If not then you'd need a macro.

    Personally I'm not a big fan of using cell colours to calculate or count things. Colours are all too easily changed or shaded which leads to inaccurate results.

  12. #12
    Forum Contributor
    Join Date
    02-27-2004
    Location
    California, United States
    MS-Off Ver
    Excel 2016
    Posts
    315

    Re: I need to calculate how many times a number appears on the sheet

    If you want to go line by line, a shorter formula would be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you want to count how many are on your sheet total:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I don't know of a formula that will count conditionally formatted cells or cells that are just filled with color, but you could probably do it with VBA.

  13. #13
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: I need to calculate how many times a number appears on the sheet

    Counting colors is going to require you add functions to Excel... which also requires jumping into the VBA side of things...Don't fear it, embrace it - Quite simple really...

    Hit Alt+F11 (Hold alt and tap F11 on your Keyboard) - This will bring up the VBA Editor

    You should see something that says "This Workbook" on the left hand side. Right click on that and select Insert Module.

    Now double click on Module 1, a sheet that appears like a notepad will be visible within the VBA Editor.

    Copy and Paste the following into the Module, once pasted you can close the VBA Editor-

    Please Login or Register  to view this content.
    This will add a formula to your Excel doc.

    Please Login or Register  to view this content.
    Range should be the area you want to perform the count and the CELL should be a cell that contains the same color you wish to count -

    Cheers,
    -If you think you are done, Start over - ELeGault

  14. #14
    Registered User
    Join Date
    12-31-2014
    Location
    Krugersdorp SOuth africa
    MS-Off Ver
    2010
    Posts
    27

    Re: I need to calculate how many times a number appears on the sheet

    thank you :-)

  15. #15
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need to calculate how many times a number appears on the sheet

    Thanks for the rep and glad to have helped.

    Happy new year.

+ 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] Count the number of times an A appears 5 or more times consecutively
    By CCook310 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-02-2013, 04:02 PM
  2. Replies: 1
    Last Post: 07-18-2013, 10:11 AM
  3. Replies: 1
    Last Post: 11-01-2012, 08:37 AM
  4. [SOLVED] Need to Calculate How Many Times Word Appears in Column
    By kthrynileen in forum Excel General
    Replies: 3
    Last Post: 09-15-2012, 07:41 PM
  5. Calculate how many times something appears in a worksheet
    By scottdernie@aol in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2007, 04:59 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